At first: our aim is to find the total transformation of left house to the right house.
What I did it first is translating the house with the center to the origin. I already found out that the transformation is done by scaling, then rotating, then shearing and after that doing a translation again.
The issue I have right now is that if I had the rotation angle I could solve all the other transformation matrices - but this is the point where I am stuck. Do you have any idea how the rotation can be resolved? I would be happy for any hint that would lead me to find the angle of the rotation.

Thank you in advance!
I've skipped some steps, so it's not a rigorous proof, but just let me know if any step is unclear.