(1) The focus is on the X axis, and P is the right vertex, so a = 3 and b = 1.
Standard equation x 2/9
+y^2= 1
(2)
The focus is on the y axis, b=3, a=9.
Standard equation y 2/8 1
+x^2/9= 1