[step:Prove the compatibility identity $f(\hat{\delta}(q, w)) = \hat{\delta}'(f(q), w)$ by induction on $|w|$]
[claim:For every $q \in Q$ and every $w \in \Sigma^\star$, $f(\hat{\delta}(q, w)) = \hat{\delta}'(f(q), w)$]
We induct on the length $|w|$ of the word.
*Base case*, $|w| = 0$, so $w = \varepsilon$. By definition of the extended transition functions, $\hat{\delta}(q, \varepsilon) = q$ and $\hat{\delta}'(f(q), \varepsilon) = f(q)$. Hence
\begin{align*}
f(\hat{\delta}(q, \varepsilon)) &= f(q) = \hat{\delta}'(f(q), \varepsilon).
\end{align*}
*Inductive step.* Fix $n \geq 0$ and assume the identity holds for every word of length $n$. Let $w \in \Sigma^\star$ have length $n + 1$; write $w = u a$ with $u \in \Sigma^\star$ of length $n$ and $a \in \Sigma$. By the recursive definition of $\hat{\delta}$,
\begin{align*}
\hat{\delta}(q, ua) &= \delta(\hat{\delta}(q, u), a).
\end{align*}
Applying $f$ and using the single-letter compatibility condition $f(\delta(q', a)) = \delta'(f(q'), a)$ at the state $q' := \hat{\delta}(q, u) \in Q$ gives
\begin{align*}
f(\hat{\delta}(q, ua)) &= f(\delta(\hat{\delta}(q, u), a)) = \delta'(f(\hat{\delta}(q, u)), a).
\end{align*}
By the inductive hypothesis applied to $u$ (which has length $n$), $f(\hat{\delta}(q, u)) = \hat{\delta}'(f(q), u)$. Substituting,
\begin{align*}
f(\hat{\delta}(q, ua)) &= \delta'(\hat{\delta}'(f(q), u), a) = \hat{\delta}'(f(q), ua),
\end{align*}
where the last equality is the recursive definition of $\hat{\delta}'$ applied at $f(q)$ with word $ua$. This completes the inductive step, and hence the claim.
[/claim]
[proof]
See the inductive argument stated in the claim.
[/proof]
[/step]