The locus is an ellipse with foci at F'(-3,0) and F(3,0). To find the equation, we consider the points where P lies on the x-axis. When this happens, we know that PF'+PF=10. If P(a,0) is one of these points, geometry shows that PF'=a+3 and PF=a-3, so a+3+a-3=10, 2a=10, a=5. If P(0,b) is one of the points where P lies on the y-axis, we have an isosceles triangle with base length = (3-(-3))=6 and equal sides length 10/2=5. From Pythagoras we can see that the height of the triangle is √(25-9)=√16=4, so P is (0,4). By symmetry we have (0,-4) and (-5,0) as two other intersections of the axes. a=5 is the length of the semi-major axis and b=4 is the length of the semi-minor axis:
x²/25+y²/16=1 is the equation of the ellipse.