Let's look at a simpler problem. Suppose you have the situation depicted in the figure below:
Then, given the angle $\alpha$, the coordinates of the point $C''$ are:
$$
C''_x = r\cos\alpha
\qquad\mbox{and}\qquad
C''_y = r\sin\alpha
$$
where $r$ is the radius of the circle.
Now let's look at a slightly more complicated problem, depicted below:
This is very similar to the situation above. In fact,
$$
C'_x = r\cos(\alpha+\beta)
\qquad\mbox{and}\qquad
C'_y = r\sin(\alpha+\beta)
$$
By using the trigonometric relations $\sin(\alpha+\beta) = \sin\alpha\cos\beta + \sin\beta\cos\alpha$ and $\cos(\alpha+\beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta$, we can write the above as follows:
$$
C'_x = r\cos\alpha\cos\beta - r\sin\alpha\sin\beta
\qquad\mbox{and}\qquad
C'_y = r\sin\alpha\cos\beta + r\sin\beta\cos\alpha
$$
But, wait... By looking at the previous situation and replacing $C''$ with $B'$ and $\alpha$ with $\beta$, we see that
$$
B'_x = r\cos\beta
\qquad\mbox{and}\qquad
B'_y = r\sin\beta
$$
Therefore, we can write
$$
C'_x = B'_x\cos\alpha - B'_y\sin\alpha
\qquad\mbox{and}\qquad
C'_y = B'_x\sin\alpha + B'_y\cos\alpha
$$
But what you want is this, instead:
Well, we can just move everything rigidly by the vector $-\vec{OA}$ so that $A$ is now the origin of the coordinate system and we get the situation just above. This amounts to subtracting $A$ from both $B$ and $C$ to get $B'$ and $C'$ in the above, and we find
$$
C_x - A_x = (B_x-A_x)\cos\alpha - (B_y-A_y)\sin\alpha
$$
$$
C_y - A_y = (B_x-A_x)\sin\alpha + (B_y-A_y)\cos\alpha
$$
Then, finally,
$$
C_x = A_x + (B_x-A_x)\cos\alpha - (B_y-A_y)\sin\alpha
$$
$$
C_y = A_y + (B_x-A_x)\sin\alpha + (B_y-A_y)\cos\alpha
$$
Best Answer
Say you have more than two points, you can also consider for \begin{equation} T = \begin{pmatrix} T_{11} & T_{12}\\ T_{21} & T_{22} \end{pmatrix} \end{equation} the problem \begin{equation} \min_{T} \|XT-X'\|_F^2 \end{equation} with \begin{equation} X = \begin{pmatrix} x_1 & y_1\\ x_2 & y_2\\ x_3 & y_3 \end{pmatrix},\quad X' = \begin{pmatrix} x_1 '& y_1'\\ x_2' & y_2'\\ x_3' & y_3' \end{pmatrix}. \end{equation} This may look too difficult, but we have the closed-form expression for the minimizer (assuming $X$ is of sufficient rank): \begin{equation} T^{\star}=(X^{\top}X)^{-1}X^{\top}X' \end{equation} which is your desired transformation. Note that for more than two points a transformation which does the trick exactly, might simply not exist.