[proofplan]
We prove local triviality of the pullback directly from local triviality of $E$. Around a point $x\in X$, choose a trivializing neighbourhood $U\subset B$ of $f(x)$ for $E$; continuity of $f$ makes $W=f^{-1}(U)$ an open neighbourhood of $x$. The given trivialization of $E$ over $U$ then induces a homeomorphism from $\pi_f^{-1}(W)$ to $W\times\mathbb R^r$, and the formula shows that the fiberwise [vector space](/page/Vector%20Space) structure is carried exactly to the standard one on $\mathbb R^r$.
[/proofplan]
[step:Choose a trivializing neighbourhood after pulling back along $f$]
Fix $x_0\in X$. Since $\pi:E\to B$ is a rank $r$ real [vector bundle](/page/Vector%20Bundle), there exist an [open set](/page/Open%20Set) $U\subset B$ with $f(x_0)\in U$ and a vector bundle trivialization
\begin{align*}
\Phi_U:\pi^{-1}(U)\to U\times\mathbb R^r
\end{align*}
such that, if $p_1:U\times\mathbb R^r\to U$ denotes the first projection, then $p_1\circ\Phi_U=\pi|_{\pi^{-1}(U)}$, and each fiber map is a real linear isomorphism onto $\mathbb R^r$.
Define
\begin{align*}
W:=f^{-1}(U)\subset X.
\end{align*}
Because $f$ is continuous and $U$ is open in $B$, the set $W$ is open in $X$. Since $f(x_0)\in U$, we have $x_0\in W$.
[/step]
[step:Construct the pulled back local trivialization over $W$]
Let $p_2:U\times\mathbb R^r\to\mathbb R^r$ denote the second projection. Define
\begin{align*}
\Psi_W:\pi_f^{-1}(W)\to W\times\mathbb R^r
\end{align*}
by
\begin{align*}
\Psi_W(x,e)=\bigl(x,p_2(\Phi_U(e))\bigr).
\end{align*}
This is well-defined: if $(x,e)\in\pi_f^{-1}(W)$, then $x\in W$, hence $f(x)\in U$, and the defining relation for $f^*E$ gives $\pi(e)=f(x)\in U$, so $e\in\pi^{-1}(U)$.
Define
\begin{align*}
\Theta_W:W\times\mathbb R^r\to \pi_f^{-1}(W)
\end{align*}
by
\begin{align*}
\Theta_W(x,v)=\bigl(x,\Phi_U^{-1}(f(x),v)\bigr).
\end{align*}
This is well-defined because $x\in W$ implies $f(x)\in U$, so $(f(x),v)\in U\times\mathbb R^r$. Moreover
\begin{align*}
\pi\bigl(\Phi_U^{-1}(f(x),v)\bigr)=f(x)
\end{align*}
because $p_1\circ\Phi_U=\pi|_{\pi^{-1}(U)}$, so $\Theta_W(x,v)\in f^*E$ and $\pi_f(\Theta_W(x,v))=x\in W$.
[guided]
The goal is to build a local product description of the pullback bundle over the open set $W=f^{-1}(U)$. The trivialization $\Phi_U$ already turns each element $e\in E$ [lying over](/theorems/2876) a point of $U$ into a pair consisting of its base point and its coordinate vector in $\mathbb R^r$. For an element $(x,e)\in f^*E$, the base point of $e$ is forced to be $f(x)$, so the only new information in the fiber is the $\mathbb R^r$ coordinate of $e$.
Let $p_2:U\times\mathbb R^r\to\mathbb R^r$ be the second projection. Define
\begin{align*}
\Psi_W:\pi_f^{-1}(W)\to W\times\mathbb R^r
\end{align*}
by
\begin{align*}
\Psi_W(x,e)=\bigl(x,p_2(\Phi_U(e))\bigr).
\end{align*}
We must check that the formula has the stated domain and codomain. If $(x,e)\in\pi_f^{-1}(W)$, then $x\in W=f^{-1}(U)$, so $f(x)\in U$. Since $(x,e)\in f^*E$, the pullback relation gives $f(x)=\pi(e)$. Hence $\pi(e)\in U$, so $e\in\pi^{-1}(U)$ and $\Phi_U(e)$ is defined. The first component of $\Psi_W(x,e)$ is $x\in W$, and the second component lies in $\mathbb R^r$ by definition of $p_2$.
Now define the candidate inverse
\begin{align*}
\Theta_W:W\times\mathbb R^r\to \pi_f^{-1}(W)
\end{align*}
by
\begin{align*}
\Theta_W(x,v)=\bigl(x,\Phi_U^{-1}(f(x),v)\bigr).
\end{align*}
This formula is forced by the desired inverse property: over $x$, the corresponding point of $E$ should be the element whose $\Phi_U$-coordinate is $(f(x),v)$. Since $x\in W$, we have $f(x)\in U$, so $(f(x),v)\in U\times\mathbb R^r$ and $\Phi_U^{-1}(f(x),v)$ is defined. Also,
\begin{align*}
\pi\bigl(\Phi_U^{-1}(f(x),v)\bigr)=p_1(f(x),v)=f(x),
\end{align*}
where the first equality uses $p_1\circ\Phi_U=\pi|_{\pi^{-1}(U)}$. Therefore $\Theta_W(x,v)$ satisfies the defining equation for membership in $f^*E$, and its projection under $\pi_f$ is $x\in W$.
[/guided]
[/step]
[step:Verify that the two formulas are inverse homeomorphisms]
For $(x,e)\in\pi_f^{-1}(W)$, write
\begin{align*}
\Phi_U(e)=(f(x),v)
\end{align*}
where $v:=p_2(\Phi_U(e))\in\mathbb R^r$. Then
\begin{align*}
\Theta_W(\Psi_W(x,e))=\Theta_W(x,v)=\bigl(x,\Phi_U^{-1}(f(x),v)\bigr)=(x,e).
\end{align*}
For $(x,v)\in W\times\mathbb R^r$, the definition of $\Theta_W$ gives
\begin{align*}
\Phi_U\bigl(\Phi_U^{-1}(f(x),v)\bigr)=(f(x),v),
\end{align*}
and hence
\begin{align*}
\Psi_W(\Theta_W(x,v))=(x,v).
\end{align*}
Thus $\Psi_W$ is bijective with inverse $\Theta_W$.
The map $\Psi_W$ is continuous because it is the restriction of the product map obtained from the continuous maps $(x,e)\mapsto x$ and $e\mapsto p_2(\Phi_U(e))$. The map $\Theta_W$ is continuous because $(x,v)\mapsto (f(x),v)$ is continuous from $W\times\mathbb R^r$ to $U\times\mathbb R^r$, and $\Phi_U^{-1}$ is continuous. Therefore $\Psi_W$ is a homeomorphism.
[/step]
[step:Check that the local trivialization preserves the fiber vector spaces]
For each $x\in W$, the fiber of $\pi_f$ over $x$ is
\begin{align*}
(\pi_f)^{-1}(\{x\})=\{(x,e)\in f^*E:\pi(e)=f(x)\}.
\end{align*}
The restriction of $\Psi_W$ to this fiber is
\begin{align*}
(\pi_f)^{-1}(\{x\})\to \{x\}\times\mathbb R^r,\qquad (x,e)\mapsto \bigl(x,p_2(\Phi_U(e))\bigr).
\end{align*}
Under the identification of $(\pi_f)^{-1}(\{x\})$ with $E_{f(x)}:=\pi^{-1}(\{f(x)\})$ by $(x,e)\mapsto e$, this restriction is exactly the fiberwise linear isomorphism induced by $\Phi_U$ on $E_{f(x)}$. Hence it is a real linear isomorphism onto $\{x\}\times\mathbb R^r$.
[/step]
[step:Conclude that the pullback is a rank $r$ vector bundle]
The preceding construction applies to every $x_0\in X$. The resulting open sets $W=f^{-1}(U)$ cover $X$, and on each such $W$ the map
\begin{align*}
\Psi_W:\pi_f^{-1}(W)\to W\times\mathbb R^r
\end{align*}
is a homeomorphism over $W$ whose restriction to every fiber is a real linear isomorphism. Therefore $\pi_f:f^*E\to X$ is locally trivial with model fiber $\mathbb R^r$. Consequently $f^*E\to X$ is a real vector bundle of rank $r$.
[/step]