We can adapt Sjoerd'sSjoerd's solution to the question, Table - find index of the maximum elementTable - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combinationList manipulation: position & max value combination.
tt1 = Flatten[
Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
{x, 0, 5, 1}, {y, 0, 5, 1}],
2];
Then this yields {x, y, max}
:
tt1 ~Part~ Last @ Ordering @ tt1[[All, 3]]
(*
{5, 5, 1/2 (-1 + Sqrt[501])}
*)