Age 14 to 16 Challenge Level:
Simple hint: how would you find the set of points that are
equidistant from two given points?
When might that locus not intersect with the given line?
Harder, last part: try dropping perpendiculars from $A$ and $B$
onto the given line.
The distance between those positions might be useful.
When is $P$ between those positions and when is it outside?