When a point starting at $O(0,0)$ intersects a side of the square $ABCO$, it reflects so the original angle and reflecting angle are equal. In the bottom side of the square ($AO$), we know the point intersects at $M\left(\dfrac12, 0\right)$.
What is the value of $m$ so that the line $y = mx$ intersects with the top of the square ($BC$) and right side of the square ($AB$) before intersecting with the bottom of the square ($AO$) at $M$?
I'm able to prove that the angle between each line and the sides of the square is $45^\circ$ and that the angle between two reflecting lines is $90^\circ$. But I haven't been able to use that to find the value of $m$.
I also see that if I continue drawing the line from $M$ so it reflects off the left and top of the square, it will intersect with $A(1,0)$, making a symmetric diagram if I draw a line from $M\left(\dfrac12, 0\right)$ to $\left(\dfrac12, 1\right)$. I believe there must be a way to prove that the two intersections with the top of the square must be at $\left(\dfrac12,1\right)$ and $\left(\dfrac34,1\right)$ (which would make the value of $m = \frac34$). But I don't see how to prove that.


Let $P$ and $Q$ be the points of intersection of the trajectory with $BC$ and $AB$, respectively. It's not hard to see that $\triangle OCP \sim \triangle PBQ \sim \triangle MAQ$.
From $\triangle PBQ \sim \triangle MAQ$, we get: $$\frac{BP}{BQ} = \frac{AM}{AQ} \Longrightarrow BP = BQ \cdot \frac{AM}{AQ} = (1-AQ)\frac{AM}{AQ} = \frac{AM}{AQ}-AM$$
But from similarity $\triangle OCP\sim \triangle MAQ$, we get $\displaystyle{\frac{AM}{AQ} = \frac{CP}{OC} = CP}$.
So we have that $BP = CP - AM$. But $AM = \frac{1}{2}$, and $BP = 1 - CP$, so $CP = \frac{3}{4}$. Hence, $P = \left(\frac{3}{4},1\right)$, and $m = \frac{4}{3}$.
Edit:
To prove that $\triangle OCP \sim \triangle MAQ$, we just need to do some angle chasing. Since $AO \parallel BC$, we have that $\angle AOP = \angle CPO$. Due to the reflection of the trajectory conditions, we also have that $\angle CPO = \angle BPQ$. Hence $\triangle OCP \sim \triangle PBQ$ by the $AA$ criterion (they are also both right triangles). Again by the reflection condition, $\angle BQP = \angle AQM$, and since they are both right triangles, $\triangle PBQ \sim \triangle MAQ$, which proves that the three triangles are similar.