How to compute magnitude and phase response from transfer function in Z-domain?
Use euler identity to expand the exponential to cos and sin. Then rationalize the denominator, and the last step is to group it to real part and imaginary part. To compute the magnitude just use the pythagoras theorem.

For an example I'll use simple transfer function like: $$H(z) = \frac {z}{z-0.5}$$
Then substitue the $z$:$$H(e^{jw})=\frac{e^{jw}}{e^{jw}-0.5}$$
Expand to cos and sin:
$$H(e^{jw})=\frac{cos(w)+jsin(w)}{cos(w)+jsin(w)-0.5}$$
Rationalize the denominator, group into real and imaginary part:
$$\begin{eqnarray*}H(e^{jw})&amp;=&amp;\frac{cos(w)+jsin(w)}{cos(w)+jsin(w)-0.5}\cdot\frac{cos(w)-jsin(w)-0.5}{cos(w)-jsin(w)-0.5}\\
&amp;=&amp;\frac {e^{jw}\cdot (e^{-jw}-0.5)}{(e^{jw}-0.5)\cdot (e^{-jw}-0.5)}\\
&amp;=&amp;\frac {e^{jw-jw}-0.5e^{jw}}{e^{jw-jw}-0.5e^{jw}-0.5e^{-jw}+0.25}\\
&amp;=&amp;\frac {1-0.5e^{jw}}{1.25-0.5cos(w)-j0.5sin(w)-0.5cos(w)+j0.5sin(w)}\\
&amp;=&amp;\frac {1-0.5cos(w)-j0.5sin(w)}{1.25-cos(w)}\\
&amp;=&amp;\frac {1-0.5cos(w)}{1.25-cos(w)} - j\frac {0.5sin(w)}{1.25-cos(w)}\\
\end{eqnarray*}$$
Compute the magnitude:
$$ \begin{eqnarray*} \left|H(e^{jw})\right| &amp;=&amp; \sqrt{\Re(H(e^{jw}))^2+\Im(H(e^{jw}))^2}\\
&amp;=&amp; \frac {\sqrt{(1-0.5cos(w))^2+(0.5sin(w))^2}} {1.25-cos(w)}\\
&amp;=&amp; \frac {\sqrt{1-cos(w)+0.25cos^2(w)+0.25sin^2(w)}} {1.25-cos(w)}\\
&amp;=&amp; \frac {\sqrt{1-cos(w)+0.25(cos^2(w)+sin^2(w))}} {1.25-cos(w)}\\
&amp;=&amp; \frac {\sqrt{1-cos(w)+0.25}} {1.25-cos(w)}\\
&amp;=&amp; \frac {\sqrt{1.25-cos(w)}} {1.25-cos(w)}\\
\end{eqnarray*}$$
And you're done!