PA and PB are perpendicular
meaning their gradients multiply to be -1
so find their gradients using the formulae y-y1/x-x1 and sub in the appropriate x1 and y1 values, equate the product of these gradients to -1 and proceed from there
(i meant y2-y1/x2-x1 but pre-emptively subbed in P(x,y) in...