Question: A point P(a,b) is equidistant from the y-axis and from the point (4,0). find a relationship between a and b

My attempt

using the formula to find the coordinates on y-axis

$\displaystyle m=[(\frac{x_{1}+x_{2}}{2}),(\frac{y_{1}+y_{2}}{2})]$

find the a

since the coordinate is on the y-axis therefore x= 0

hence

$\displaystyle \frac{0+4}{2} =2 = a $ therefore a = 2

since (4,0) P(a,b)

$\displaystyle \frac{0 + y_{2}}{2} =b $

therefore y=2b

the coordinates on the y-axis is (0,2b) let 's call it b and a= (4,0)

find the distance of BP and AP

$\displaystyle BP = \sqrt{(2b-b)^2 +(0-a)^2} $

$\displaystyle BP = \sqrt{b^2+a^2} $

$\displaystyle AP = \sqrt{(4-a)^2 +(0-b)^2}$

$\displaystyle AP = \sqrt{16-8a+a^2 +b^2} $

find AB

$\displaystyle \sqrt{(4-0)^2+(0-2b)^2}$$\displaystyle \sqrt{16+4b^2} $

AB = AP + BP

$\displaystyle 16+4b^2 = 16-8a+a^2 +b^2 +b^2+a^2$

$\displaystyle b^2 = a^2-4a$

the answer in the book is

$\displaystyle b^2 = 8a -16$

where did i go wrong?

please any help