Im supposed to find the point B(x,y,z) which is a point on the surface z = x^2 + y^2 and is closest to the point A(3,0,0,)?

HOW?

I was said to differentiate the distance D between B and A, ( )then the shortest distance will be for dD/dx = 0 & dD/dy = 0. Can anyone tell me why it is so?

Also i believe that posing y=0 is a good thought... then the question would be to find the distance from A to the curve z=x^2

Thanks!