Does a polynomial-time reduction from A to B imply that B is in NP if A is?
For your proof to work correctly, $f$ must be surjective:

\begin{align}
f: \Sigma_A^\star \to \Sigma_B^\star \\
\forall y \in \Sigma_B^\star \quad \exists x \in \Sigma_A^\star: f(x) = y
\end{align}

Otherwise, you cannot guess a $x$ for each $y \in \Sigma_B^\star$, with $f(x) = y$ in step 1.

Alghough some polynomial reductions are bijective (e.g. CLIQUE $\le_p$ INDEPENDENTSET), a polynomial reductions is not required to be either injective or surjective. This is why your proof fails. There are even proofs that use reductions, whose image only consist of two words. 

Example for such an extreme case: Proove that $L_1, L_2 \subseteq \Sigma^\star$, where $L_2 \ne \emptyset$ and $L_2 \ne \Sigma^\star$, both $L_1$ and $L_2$ are in $P$ implies that there exists a polynomial reduction from $L_1$ to $L_2$.

Let $w_t \in L_2$ and $w_f \in \Sigma^\star \setminus L_2$. Construct $f: \Sigma^\star \to \Sigma^\star$, such that
\begin{align}
f(x) = \begin{cases}
w_t  &amp; \mbox{if } x \in L_1\\
w_f  &amp; \mbox{if } x \notin L_1
\end{cases}
\end{align}
Since $L_1$ is in $P$, $f$ simply calls a TM that decides $L_1$ and then outputs the corresponding words. Therefore, $L_1 \le_p L_2$.