Here's another spacetime diagram that might help.
By using "rotated graph paper",
many calculations can be done by counting and doing very simple arithmetic.
The boxes in the grid ("light-clock diamonds") are based on the light-clock of the observer at rest who draws this diagram.
By forming the "causal diamond" where your events are opposite corners
and the diamond-edges are along the lightcone, the area of the diamond (in units of the light-clock diamond) gives the square-interval between those events. The square-root of the magnitude gives the "length" along the diagonal of the diamond.
I tried to reconstruct the situation you have drawn.
It seems that your moving frame moves at ##v=(0.5)c##, and your rocks are at ##x=5## and ##x=8##.
By computing the areas, you can see that the moving frame measures a shorter distance between the parallel worldlines.
(t,x) coordinates: P1=(2.5, 5) and P2=(4,8)
The square-interval (using the ##(+,-,-,-)##-convention ) is ##(4-2.5)^2-(8-5)^2= -6.75##
Note: for ##v=(1/2)c##, we have ##\gamma=\frac{1}{\sqrt{1-v^2}}=\sqrt{4/3}##. Furthermore,
$$(\ell')^2=\frac{\ell^2}{\gamma^2}=\frac{9}{4/3}=(27/4)=6.75$$
If you choose nice numbers (like ##v=(3/5)c##, which have rational Doppler factors, here ##k=2##
(whereas ##v=(1/2)c## has ##k=\sqrt{3}##)), the
arithmetic is easier (especially when used with nicer intervals, like 5 (rather than 3) for ##v=(3/5)c##) and the
visualization of the ticks along the segments is easier... assuming the primary goal is to first have an understanding of what is going on... before moving on to solving more general problems.
With ##v=(3/5)c## (so, ##k=\sqrt{\frac{1+v}{1-v}}## and ##\gamma=\frac{1}{\sqrt{1-v^2}}=5/4##)
and ##\ell=5## (between ##x=5## and ##x=10##).
For more on this approach, consult my Insights (first link in my signature below).