Because vector AP= 1/2 vector PB
So (-5-x, 4-0)= 1/2(0-(-5), y-4).
That is -5-x=( 1/2)*5.
4=y-4
X=- 15/2 y=8。
So a (-15/2,0) b (0,8)
Given point A and point P, the equation is solved by two-point formula.
Or know points p and b, and solve the linear equation with two-point formula.