As you can see, In the image a rectangle gets translated to another position in the coordinates System.
The origin Coordinates are A1(8,2) B1(9,3) from the length 7 and the height 3 you can also guess the vertices of the rectangle.
Now the Rectangle gets moved.
Now A1 is at A2(16,9) and B1 is located at B2(16,11).
It means that the rectangle got translated, rotated and stretched.
How can I calculate the Coordinates, of the left-upper corner?
I first tried to calculate the stretching-factor but then I got stuck when I trying to calculate the angle and translation
Thanks for your help

This answer uses complex numbers.
We want to find $a,b,\theta\in\mathbb R$ where $0\lt\theta\lt \pi$ such that $$(16+9i)-(a+bi)=\sqrt 2(8+2i)(\cos\theta+i\sin\theta)$$ $$(16+11i)-(a+bi)=\sqrt 2(9+3i)(\cos\theta+i\sin\theta)$$ Then, solving $$16-a=\sqrt 2(8\cos\theta-2\sin\theta)$$ $$9-b=\sqrt 2(8\sin\theta+2\cos\theta)$$ $$16-a=\sqrt 2(9\cos\theta-3\sin\theta)$$ $$11-b=\sqrt 2(9\sin\theta+3\cos\theta)$$ gives $$a=10,\quad b=-1,\quad \theta=\frac{\pi}{4}$$
Thus, the coordinate you want is $$\sqrt 2(3+4i)\left(\cos\frac{\pi}{4}+i\sin\frac{\pi}{4}\right)+(10-i)=9+6i,$$ i.e. $$\color{red}{(9,6)}$$