I have two triangles with these corner points:
$$
A=
\left[ {\begin{array}{cc}
0 & -0.5 & 1\\
0 & 0.5 & 1\\
\end{array} } \right]
$$
$$
B=
\left[ {\begin{array}{cc}
1.5 & 2 & 2.5\\
0.5 & 1 & -0.5\\
\end{array} } \right]
$$
They look like this when plotted.

I have to transform triangle B to triangle A.
I did this by:
- $T_1$ = Translating B to the origin.
- $R_1$ = Rotating B 90 degree counter clockwise.
- $T_2$ = Translate B to the same coordinates as A.
Now I want to combine all these operations into one matrix S however I am not sure how this can be done. Is it just S = $T_1 * R_1 * T_2$?
$$ T_1= \left[ {\begin{array}{cc} 1 & 0 & -2\\ 0 & 1 & 0\\ 0 & 0 & 1\\ \end{array} } \right] $$
$$ R_1= \left[ {\begin{array}{cc} 0 & -1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 1\\ \end{array} } \right] $$
$$ T_2= \left[ {\begin{array}{cc} 1 & 0 & 1\\ 0 & 1 & 0.5\\ 0 & 0 & 1\\ \end{array} } \right] $$
$$ S_1 = T_1 * R_1= \left[ {\begin{array}{cc} 0 & -1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0\\ \end{array} } \right] $$
$$ S = S_1 * T_2= \left[ {\begin{array}{cc} 0 & 0 & -1\\ 1 & 0 & 1\\ 0 & 0 & 0\\ \end{array} } \right] $$
but then
$$ A = S * B= \left[ {\begin{array}{cc} -1 & -1 & -1\\ 2.5 & 3 & 3.5\\ 0 & 0 & 0\\ \end{array} } \right] $$
is wrong.
I assume that you're writing your points using homogeneous coordinates, vertically, i.e., the points $(x, y)$ is written $\pmatrix{x\\y\\1}$, and that your matrices operate on the left, i.e., you take a point $P$ and compute $MP$ (where $M$ is the matrix). It sure looks like it from the entries in your matrices.
In that case, the matrix you need is $$ M = T_2 \cdot R_1 \cdot T_1, $$ because when you multiply this by a point $P$, you compute \begin{align} M\cdot P &= (T_2 \cdot R_1 \cdot T_1)\cdot P\\ &= (T_2 \cdot R_1) (\cdot T_1 \cdot P)\\ \end{align} where the thing in the last parens gives you the coordinates of $P$ after the first translation. Continuing, \begin{align} M\cdot P &=(T_2 \cdot R_1) (\cdot T_1 \cdot P)\\ &=T_2 \cdot (R_1 \cdot (\cdot T_1 \cdot P))\\ \end{align} where the thing in the larger parens on the right is the coordinates of the translated point, after rotation. And finally, the entire right hand side is the result of all three operations, analogously.