I looked into this a few months back and spent a good 2 weeks scratching my head (and paper) about it.It is actually Einstein's maths from his own book I think.

I also wondered how he adopted a linear formulation so readily and I think the answer I came to was "because it was the simplest and because when you go through the maths it all works out in the end".

Perhaps in hindsight it may be that "it had to be linear" I can't say one way or the other.

I approached the subject with the assumption that it was going to be something complicated and it didn't occur to me it could be linear .

You are welcome to look at the thread I started about this derivation back in Feb (nobody answered ,probably for a good reason).

Einstein's mathematics in his derivation of the Lorentz transformation.
It is unlikely to be illuminating but at least you might sympathise (or gloat at ) with my struggling with the same maths that you are now looking at.