How could you be certain that simply M + x = M'? When all values of d in M would not equal all values of d' in M'? How then could you justify just moving M' over from M? Any d + x =/= d', only by solving through the Pythagorean Theorem or the proper time and proper length could you know the true difference between d and d'.
We can do all the calculations from the embankment frame.
At embankment time $$t=0$$ let M and M' be instantaneously co-located at embankment location $$x=0$$
At that same instant, let the left lighting strike occur at embankment location $$-x_{strike}$$ and let the right lighting strike occur at embankment location $$+x_{strike}$$
The velocity of the train is known to be $$v$$ therefore, as embankment time $$t$$ progrsses forward, the location of M' will be:
$$x_{M'} = vt$$
as measured by the embankment frame.
Light from the strikes travels toward M at a speed of $$c$$ so the location of the left wavefront will be:
$$x_{Lwave} = -x_{strike} + ct$$
and the location of the right wavefront will be:
$$x_{Rwave} = +x_{strike} - ct$$
as measured by the embankment frame.
After an embankment time of $$\frac{x_{strike}}{c}$$ the left wavefront will be located at $$x_{Lwave} = 0$$ and the right wavefront will be located at $$x_{Rwave} = 0$$ both of which are where M is located.
But by that time, M' will be located at:
$$x_{M'} = \frac{vx_{strike}}{c}$$
which is off to the right of M.
Thus, at embankment time $$\frac{x_{strike}}{c}$$ the observer at M' must have already seen the right wave front, and could not yet have seen the left wavefront.