These calculations are easy to follow if one knows some affine transformation algebra. Otherwise it is impossible to reach. I'd suggest adding that these solutions come from solving
| a b tx |
| c d ty | = TranslationMatrix x ScalationMatrix x RotationMatrix
| 0 0 1 |

Plus a link to a good reference on affine transformations (e.g. https://people.gnome.org/~mathieu/libart/libart-affine-transformation-matrices.html?)