this seems like it should be simple, but i've run out of leads with a similar-triangles approach, and the algebraic approaches seem pretty daunting, so i'm asking for help.
i'm working on a simulation where a ray of light reaches a point by bouncing once off a planar mirror. i know the position of the source, the destination point, and a point & normal of the mirror. (or any other convenient means of describing the mirror) For simplicity i'm happy to assume the mirror is infinite in extent.
as i mentioned, a geometric solution via similar-triangles and so on has not revealed itself to me, but i'm good at missing those.
for the algebraic approach i've set up a system of equations constraining the on-mirror point to 1) lie on the line of the mirror and 2) the angle between the incoming ray and normal and the angle between the outgoing ray and the normal are equal, by asserting that those Dot-products are equal. I haven't carried that math through to its end because it looks pretty monstrous because the thing i'm trying to solve for appears in so many places including inside many radicals.
I'm not saying i can't solve this, but it looks like a lot of work and if there's a better approach i'd love some advice.
Here's my sketch of the situation. Apologies if i mis-use terminology! Speaking of terminology, is there a word for this point ? The point of reflection ? The point of incidence ?

Let $S’$ be the point on $\overline{M_1 M_2}$ that realizes the minimal distance to $S$. Assuming the mirror is vast enough, the line segment $\overline{SS’}$ will be the altitude from $S$ to the opposite side in the triangle $SM_1 M_2$. Similarly, let $P'$ be the point on $\overline{M_1 M_2}$ that realizes the minimal distance to $P$. Then triangle $SS’Q$ is similar to $PP’R$ because $\angle SS'R = \angle PP’R = \frac{\pi}{2}$ and $\angle SRS’ = \angle PRP'$. If one knows the coordinates of $S$ and $P$ and an equation for the line through $M_1$ and $M_2$, one can easily compute coordinates for $S’$ and $P’$.
By similarity, $$ \frac{S’R}{SS’} = \frac{RP’}{PP’} = \frac{S’P’ - S’R}{PP’}. $$ Rearranging, we see that the distance from $S’$ to $R$ along the line of the mirror is given by $$ S’R = \frac{(SS’)(S’P’)}{PP’ + SS’}. $$