Let
and
Translating into coordinates gives 2 linear equations
Two more linear equations:
EDIT: Looking at the sketch provided by the OP, APQ doesn't look at all like a straight line in which case the problem has infinitely many solutions. Otherwise, only two solutions