[proofplan]
We verify the identity pointwise on $\mathbb{H}$. After writing $\gamma$ and $\delta$ in coordinates, we expand the left-hand side using the definition of the slash operator. The fractional linear transformations compose according to matrix multiplication, and the two automorphy factors multiply to the lower-row automorphy factor of $\gamma\delta$. Substituting these two identities gives equality with $f|_k(\gamma\delta)$.
[/proofplan]
[step:Expand the iterated slash operator at an arbitrary point]
Let
\begin{align*}
\gamma = \begin{pmatrix} a & b \\ c & d \end{pmatrix},
\qquad
\delta = \begin{pmatrix} r & s \\ t & u \end{pmatrix}
\end{align*}
be elements of $SL_2(\mathbb{Z})$, and fix $z \in \mathbb{H}$. Define the fractional [linear map](/page/Linear%20Map) associated to $\delta$ by
\begin{align*}
\delta_{\mathbb{H}}: \mathbb{H} &\to \mathbb{H} \\
w &\mapsto \frac{rw+s}{tw+u}.
\end{align*}
This map is well-defined: if $tz+u=0$, then $z=-u/t \in \mathbb{R}$ when $t \neq 0$, contradicting $z \in \mathbb{H}$; when $t=0$, the equality $ru-st=1$ gives $ru=1$, so $u \neq 0$. Moreover, using $r,s,t,u \in \mathbb{R}$ and $ru-st=1$, direct calculation gives
\begin{align*}
\operatorname{Im}\left(\frac{rz+s}{tz+u}\right)
&= \frac{\operatorname{Im}(z)}{|tz+u|^2} > 0.
\end{align*}
Thus $\delta_{\mathbb{H}}(z) \in \mathbb{H}$. The same calculation applied to $\gamma$ shows that the fractional linear map associated to $\gamma$ is also a well-defined self-map of $\mathbb{H}$, so it may be evaluated at $\delta_{\mathbb{H}}(z)$. By the definition of the slash operator,
\begin{align*}
((f|_k\gamma)|_k\delta)(z)
&= (tz+u)^{-k} (f|_k\gamma)\left(\frac{rz+s}{tz+u}\right) \\
&= (tz+u)^{-k}
\left(c\frac{rz+s}{tz+u}+d\right)^{-k}
f\left(
\frac{a\frac{rz+s}{tz+u}+b}{c\frac{rz+s}{tz+u}+d}
\right).
\end{align*}
[guided]
We prove equality of functions by evaluating both sides at an arbitrary point $z \in \mathbb{H}$. Write
\begin{align*}
\gamma = \begin{pmatrix} a & b \\ c & d \end{pmatrix},
\qquad
\delta = \begin{pmatrix} r & s \\ t & u \end{pmatrix}.
\end{align*}
The first domain issue is that the expression $\frac{rz+s}{tz+u}$ must be a point of $\mathbb{H}$. Define
\begin{align*}
\delta_{\mathbb{H}}: \mathbb{H} &\to \mathbb{H} \\
w &\mapsto \frac{rw+s}{tw+u}.
\end{align*}
We verify that this formula has the stated domain and codomain. If $tz+u=0$ and $t \neq 0$, then $z=-u/t \in \mathbb{R}$, contradicting $z \in \mathbb{H}$. If $t=0$, then $ru-st=1$ gives $ru=1$, hence $u \neq 0$, so again $tz+u \neq 0$. Therefore the denominator does not vanish.
Next we check preservation of the upper half-plane. Since $r,s,t,u$ are real and $ru-st=1$, multiplying numerator and denominator by the complex conjugate of $tz+u$ gives
\begin{align*}
\operatorname{Im}\left(\frac{rz+s}{tz+u}\right)
&= \frac{\operatorname{Im}((rz+s)\overline{(tz+u)})}{|tz+u|^2} \\
&= \frac{(ru-st)\operatorname{Im}(z)}{|tz+u|^2} \\
&= \frac{\operatorname{Im}(z)}{|tz+u|^2} > 0.
\end{align*}
Thus $\delta_{\mathbb{H}}(z) \in \mathbb{H}$. Applying the same calculation to the matrix $\gamma$ shows that the fractional linear map associated to $\gamma$ is also a self-map of $\mathbb{H}$, so $\gamma$ may be applied to the point $\delta_{\mathbb{H}}(z)$.
Now apply the definition of the slash operator twice. First, applying $|_k\delta$ to the function $f|_k\gamma$ gives
\begin{align*}
((f|_k\gamma)|_k\delta)(z)
&= (tz+u)^{-k} (f|_k\gamma)\left(\frac{rz+s}{tz+u}\right).
\end{align*}
Next, evaluate $f|_k\gamma$ at the point $\frac{rz+s}{tz+u} \in \mathbb{H}$. This gives
\begin{align*}
((f|_k\gamma)|_k\delta)(z)
&= (tz+u)^{-k}
\left(c\frac{rz+s}{tz+u}+d\right)^{-k}
f\left(
\frac{a\frac{rz+s}{tz+u}+b}{c\frac{rz+s}{tz+u}+d}
\right).
\end{align*}
This expression contains the two pieces that must match the single slash by $\gamma\delta$: the product of automorphy factors and the composed fractional linear transformation.
[/guided]
[/step]
[step:Identify the composed fractional linear transformation]
The matrix product is
\begin{align*}
\gamma\delta
&=
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
\begin{pmatrix} r & s \\ t & u \end{pmatrix}
=
\begin{pmatrix}
ar+bt & as+bu \\
cr+dt & cs+du
\end{pmatrix}.
\end{align*}
For the argument of $f$ in the preceding expression, multiplying numerator and denominator by $tz+u$ gives
\begin{align*}
\frac{a\frac{rz+s}{tz+u}+b}{c\frac{rz+s}{tz+u}+d}
&=
\frac{a(rz+s)+b(tz+u)}{c(rz+s)+d(tz+u)} \\
&=
\frac{(ar+bt)z+(as+bu)}{(cr+dt)z+(cs+du)}.
\end{align*}
This is precisely the fractional linear transformation associated to $\gamma\delta$.
[guided]
The argument of $f$ is obtained by first applying $\delta$ to $z$ and then applying $\gamma$. We compute it algebraically and compare it with the matrix product. Since
\begin{align*}
\gamma\delta
&=
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
\begin{pmatrix} r & s \\ t & u \end{pmatrix}
=
\begin{pmatrix}
ar+bt & as+bu \\
cr+dt & cs+du
\end{pmatrix},
\end{align*}
the fractional linear transformation associated to $\gamma\delta$ is
\begin{align*}
z \mapsto
\frac{(ar+bt)z+(as+bu)}{(cr+dt)z+(cs+du)}.
\end{align*}
Now simplify the composed argument appearing in the iterated slash operator. Multiplying numerator and denominator by the nonzero number $tz+u$ gives
\begin{align*}
\frac{a\frac{rz+s}{tz+u}+b}{c\frac{rz+s}{tz+u}+d}
&=
\frac{a(rz+s)+b(tz+u)}{c(rz+s)+d(tz+u)} \\
&=
\frac{(ar+bt)z+(as+bu)}{(cr+dt)z+(cs+du)}.
\end{align*}
Thus the fractional linear part of first applying $\delta$ and then $\gamma$ is exactly the fractional linear part of applying the product matrix $\gamma\delta$.
[/guided]
[/step]
[step:Multiply the automorphy factors into the factor for the product matrix]
The two automorphy factors satisfy
\begin{align*}
(tz+u)\left(c\frac{rz+s}{tz+u}+d\right)
&= c(rz+s)+d(tz+u) \\
&= (cr+dt)z+(cs+du).
\end{align*}
Since $k \in \mathbb{Z}$ and all factors are nonzero, integer powers are multiplicative, so
\begin{align*}
(tz+u)^{-k}
\left(c\frac{rz+s}{tz+u}+d\right)^{-k}
=
\left((cr+dt)z+(cs+du)\right)^{-k}.
\end{align*}
[guided]
The remaining part of the slash operator is the automorphy factor. We must show that the two factors from the successive applications combine into the single lower-row factor for $\gamma\delta$. Starting from the two factors, multiply them before taking the integer power:
\begin{align*}
(tz+u)\left(c\frac{rz+s}{tz+u}+d\right)
&= (tz+u)\frac{c(rz+s)+d(tz+u)}{tz+u} \\
&= c(rz+s)+d(tz+u) \\
&= (cr+dt)z+(cs+du).
\end{align*}
The first cancellation is valid because the preceding step verified $tz+u \neq 0$. The factor $c\frac{rz+s}{tz+u}+d$ is also nonzero, because it is the denominator of the fractional linear transformation associated to $\gamma$ evaluated at the point $\delta_{\mathbb{H}}(z) \in \mathbb{H}$, and the same upper-half-plane denominator argument applies to $\gamma$.
Now use that $k \in \mathbb{Z}$. For nonzero complex numbers $A$ and $B$, integer powers satisfy $A^{-k}B^{-k}=(AB)^{-k}$, including the case $k<0$ because then the expression is an ordinary positive power. With
\begin{align*}
A &= tz+u,
&
B &= c\frac{rz+s}{tz+u}+d,
\end{align*}
we obtain
\begin{align*}
(tz+u)^{-k}
\left(c\frac{rz+s}{tz+u}+d\right)^{-k}
=
\left((cr+dt)z+(cs+du)\right)^{-k}.
\end{align*}
This is exactly the automorphy factor appearing in the slash operator for the product matrix $\gamma\delta$.
[/guided]
[/step]
[step:Substitute the two identities and conclude equality of functions]
Combining the identities from the previous two steps, we obtain
\begin{align*}
((f|_k\gamma)|_k\delta)(z)
&=
\left((cr+dt)z+(cs+du)\right)^{-k}
f\left(
\frac{(ar+bt)z+(as+bu)}{(cr+dt)z+(cs+du)}
\right) \\
&=
(f|_k(\gamma\delta))(z).
\end{align*}
Because $z \in \mathbb{H}$ was arbitrary, the two functions $\mathbb{H} \to \mathbb{C}$ are equal:
\begin{align*}
(f|_k\gamma)|_k\delta = f|_k(\gamma\delta).
\end{align*}
[guided]
We now assemble the two computations. The composed fractional linear transformation was shown to be
\begin{align*}
\frac{a\frac{rz+s}{tz+u}+b}{c\frac{rz+s}{tz+u}+d}
&=
\frac{(ar+bt)z+(as+bu)}{(cr+dt)z+(cs+du)},
\end{align*}
and the product of automorphy factors was shown to be
\begin{align*}
(tz+u)^{-k}
\left(c\frac{rz+s}{tz+u}+d\right)^{-k}
&=
\left((cr+dt)z+(cs+du)\right)^{-k}.
\end{align*}
Substituting both identities into the expanded iterated slash operator gives
\begin{align*}
((f|_k\gamma)|_k\delta)(z)
&=
\left((cr+dt)z+(cs+du)\right)^{-k}
f\left(
\frac{(ar+bt)z+(as+bu)}{(cr+dt)z+(cs+du)}
\right).
\end{align*}
By the computed product
\begin{align*}
\gamma\delta
&=
\begin{pmatrix}
ar+bt & as+bu \\
cr+dt & cs+du
\end{pmatrix},
\end{align*}
the last displayed expression is precisely the definition of $(f|_k(\gamma\delta))(z)$. Hence
\begin{align*}
((f|_k\gamma)|_k\delta)(z)=(f|_k(\gamma\delta))(z).
\end{align*}
Since $z \in \mathbb{H}$ was arbitrary, the two maps $\mathbb{H} \to \mathbb{C}$ agree pointwise, so
\begin{align*}
(f|_k\gamma)|_k\delta = f|_k(\gamma\delta).
\end{align*}
[/guided]
[/step]