In[1]:= Solve[(a^2 + x^2 - 2 a x)/(x - a) == 0, x]
Out[1]= {{x -> a}}
In[2]:= (a^2 + x^2 - 2 a x)/(x - a) /. %
1
Power::infy: Infinite expression - encountered.
0
Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered.
Out[2]= {Indeterminate}