The solution is supposed to be
$w = \frac{2(z+i)}{z-1}$
Also, is it Okay to ask such questions here? It's not homework, it's the last few sets of problems I can't get on my own. Some belong to Complex Variables & Conformal Mapping and some to Vector Calculus.
Here is a method using "points" $0,1,\infty$.
Let us consider the Möbius transformation :
$$f_{a,b,c}(z):=\dfrac{c(a-b)z+a(b-c)}{(a-b)z+(b-c)} \ \ \ \leftrightarrow \begin{pmatrix} \ \ \ c(a-b)&a(b-c)\\ \ (a-b)&(b-c)\end{pmatrix}\tag{1}$$
It is such that $$f_{a,b,c}(0)=a, \ \ \ f_{a,b,c}(1)=b, \ \ \ f_{a,b,c}(\infty)=c.$$
Using $0,1,\infty$ as intermediate values, the final transform can be expressed as the composition :
$$f=f_{0,-2i,4}\circ f^{-1}_{-i,0,2+i}$$
In a concrete way, it amounts to compute the matrix product :
$$\begin{pmatrix} \ \ \ 8i & 0\\ \ \ 2i&(-2i-4)\\ \end{pmatrix}\begin{pmatrix} \ \ \ -i(2+i)&i(2+i)\\ \ \ -i &-(2+i)\\ \end{pmatrix}^{-1}$$
being understood that these matrices are defined up to a multiplicative factor. For example the previous product can be written equivalently :
$$\begin{pmatrix} \ \ \ 8i & 0\\ \ \ 2i&-2(2+i)\\ \end{pmatrix}\begin{pmatrix} \ \ \ -i&i\\ \ \ -\dfrac{i}{2+i}&-1\\ \end{pmatrix}^{-1}$$
or, equivalently again :
$$\begin{pmatrix} \ \ \ 4i & 0\\ \ \ i&-(2+i)\\ \end{pmatrix}\begin{pmatrix} \ -1&-i\\ \ \ \dfrac{i}{2+i}&-i\\ \end{pmatrix}$$
or (simplification by $i$):
$$\begin{pmatrix} \ \ \ 4i & 0\\ \ \ i&-(2+i)\\ \end{pmatrix}\begin{pmatrix} \ i&1\\ \ \ \dfrac{1}{2+i}&-1\\ \end{pmatrix}$$
whence the looked for matrix :
$$\begin{pmatrix} 2& 2i\\ 1&-1\\ \end{pmatrix} \ \ \text{associated with} \ \ w=\dfrac{2z+2i}{z-1}.$$
Edit : what I have explained on your example could be the consequence of plugging the values of $a, b, c, a', b', c'$ (where $f(a)=a',f(b)=b',f(c)=c'$ into the following product, giving an explicit formula :
$$\begin{pmatrix} \ \ \ c'(a'-b')&a'(b'-c')\\ \ (a'-b')&(b'-c')\end{pmatrix}\begin{pmatrix} \ \ \ (b-c)&a(c-b)\\ \ (b-a)&c(a-b)\end{pmatrix}$$