Let \(z = x + iy\), \(Re(z) = x\) \((\therefore x = 5)\)
\(z^2 = (x + iy)^2\)
\(= x^2 - y^2 + i2xy\)
\(Re (z^2) = x^2 - y^2 = 5-y^2\) \((\because x = 5)\)
\(Im (z^2) = 2xy = 10 y\)
\(Re(z^2) - Im(z^2) = 5 - y^2 - 10y\)
\(= 5 - (y^2 + 10y + 25) +25\)
\(= 30 - (y + 5)^2\)
\(\therefore \) Maximum value of \(Re(z^2) - Im(z^2) = 30\)