A point lies on the line exactly when its coordinates satisfy the equation.
Target P (3,0) is on the beam, so
a×3+b×0=15⇒3a=15⇒a=5
Target Q (0,−5) is on the beam, so
a×0+b×(−5)=15⇒−5b=15⇒b=−3
So a=5, b=−3, and the beam travels along
5x−3y=15
Check: 5×3−3×0=15 and 5×0−3×(−5)=15.