I understand your question as a request on how to deal with this system of equations correctly and with understanding.
The second equation, xy = 6 has no squares so that x and y are uniquely related.
We can say y = 6/x and substitute it into the 1st equation:
x^2 +36/x^2 = 25
Now we multiply this by x^2, move everything to the left hand side and get
x^4 - 25 x^2 + 36 = 0
Formally, this is an equation of the 4th order, but in fact it can be reduced to 2nd order by substitution
z = ...