Part (a)
#g(x) = (x-a)^2(x-b)#
#g'(x) = 2(x-a)(x-b)+(x-a)^2(1)#
# = (x-a)(3x-(a+2b))#
#g'(x) = 0# at #x=a# and at #x = (a+2b)/3#
The stationary points are
#(a,0)# and #((a+2b)/3, f((a+2b)/3)) = ((a+2b)/3, (4(a-b)^3)/27)#
Part (b) cannot be read and part (d) cannot be answered without knowing what #p# is.
Part (d)
IF we interpret "there are two solutions" to mean "there are exactly two distinct solutions", and we assume that #a != b#, then we have
#p = 0# which occurs at #(a,0)# and #(b ,0)#
or #p = (4(a-b)^3)/27# which occurs at # x= (a+2b)/3# and at another value of #x#
That other value of #x# may be found by using the fact that we know one solution (in fact a solution of multiplicity 2) of the equation #g(x) = (4(a-b)^3)/27#. If nothing better occurs to us, we can do the division to factor #g(x) - (4(a-b)^3)/27#