[proofplan]
The proof is a direct verification of the Lipschitz inequality for the restricted map. We take two arbitrary points of the subspace $Y$, use the defining equality between the subspace metric and the ambient metric, and then apply the Lipschitz inequality for $f$ on all of $X$. Finally, we rewrite the values of $f$ on points of $Y$ as values of the restriction $f|_Y$.
[/proofplan]
[step:Compare the restricted distance with the ambient distance]
Let $y_1,y_2\in Y$ be arbitrary. Since $Y$ carries the subspace metric induced by $d_X$, the distance between $y_1$ and $y_2$ in $Y$ is
\begin{align*}
d_Y(y_1,y_2)=d_X(y_1,y_2).
\end{align*}
[guided]
We begin with the exact pair of points for which the Lipschitz condition must be checked. Let $y_1,y_2\in Y$ be arbitrary. Because $Y$ is not being given an unrelated metric, but the subspace metric inherited from $X$, the distance function on $Y$ is precisely the restriction of $d_X$ to $Y\times Y$. Therefore
\begin{align*}
d_Y(y_1,y_2)=d_X(y_1,y_2).
\end{align*}
This identity is the only place where the subspace metric hypothesis is used.
[/guided]
[/step]
[step:Apply the Lipschitz inequality for the ambient map]
Because $f:X\to Z$ is Lipschitz with constant $L$, for all $x_1,x_2\in X$ one has
\begin{align*}
d_Z(f(x_1),f(x_2))\leq Ld_X(x_1,x_2).
\end{align*}
Since $y_1,y_2\in Y\subset X$, this inequality applies with $x_1=y_1$ and $x_2=y_2$, giving
\begin{align*}
d_Z(f(y_1),f(y_2))\leq Ld_X(y_1,y_2).
\end{align*}
Using $d_X(y_1,y_2)=d_Y(y_1,y_2)$, we obtain
\begin{align*}
d_Z(f(y_1),f(y_2))\leq Ld_Y(y_1,y_2).
\end{align*}
[/step]
[step:Rewrite the inequality for the restriction]
The restriction map is
\begin{align*}
f|_Y:Y&\to Z
\end{align*}
and satisfies $(f|_Y)(y)=f(y)$ for every $y\in Y$. Hence
\begin{align*}
d_Z((f|_Y)(y_1),(f|_Y)(y_2))\leq Ld_Y(y_1,y_2).
\end{align*}
Since $y_1,y_2\in Y$ were arbitrary, $f|_Y:Y\to Z$ is Lipschitz with constant $L$.
[/step]