Proof (continuous iff preimage of base elements is open)
Continuity $\implies$ $f\inv(B)$ open for all $B\in \mathcal{B}$
$B$ is open, and so the result follows from here.
$f\inv(B)$ open for all $B\in \mathcal{B}$ $\implies$ continuity
Any open set $U\in \rho$ is a union of base elements $$ \begin{align*} U = \bigcup_{B\in \mathcal{C}} B \end{align*} $$ where $\mathcal{C}\subseteq \mathcal{B}$.
Therefore $$ \begin{align*} f\inv(U) = \bigcup_{B\in \mathcal{C}} f\inv(B) \end{align*} $$ is an union of open sets and is thus open. Hence $f$ is continuous.