Let A = x^2 + y^2 = x^2 + (30 - x)^2 = x^2 + 900 + x^2 - 60x. That is A = 2x^2 -60x + 900 = 2(x^2 - 30x + 450) = 2[(x - 15)^2 - 225 + 450] = 2(x - 15)^2 + 450. So max. value of x^2 + y^2 = 450 when x = 15. Correction : should be min. value, not max. value.