Here is a sketch of a direct reduction from 3-SAT to your problem.
Given a formula $\phi$, create a graph that contains:
For each variable $x_i$ of $\phi$: a path of length 2 traversing vertices $x_i, u_i, \overline{x}_i$. Vertex $u_i$ is in $A$ and $g(u_i)=1$.
For each clause $C_j$ of $\phi$, a path of length 2 traversing vertices $v_j, w_j, z_j$. Vertex $w_j$ is in $A$ and $g(w_j)=3$.
For each variable-clause pair $(x_i, C_j)$ such that $x_i$ is a literal in $C_j$, add the edge $(x_i, w_j)$.
For each variable-clause pair $(x_i, C_j)$ such that $\overline{x}_i$ is a literal in $C_j$, add the edge $(\overline{x}_i, w_j)$.
If there is a solution to the SAT instance, you can obtain a solution to your problem by selecting a set $B$ that contains all true literals (i.e., if $x_i$ is true, add $x_i$ to $B$, otherwise add $\overline{x}$ to $B$).
Now all vertices $u_i$ have exactly one neighbor in $B$, while each vertex $w_j$ has $\eta_i \in \{1,2,3\}$ neighbors in $B$. By adding $3-\eta_i$ vertices from $\{v_j, z_j\}$ to $B$ you can also satisfy the condition on $w_j$.
The reverse direction is also true. For each variable $x_i$ exactly one vertex in $\{x_i, \overline{x}_i \}$ is in $B$ and this determines the truth value of $x_i$ in the satisfying assignment. Each vertex $w_j$ must have at least one neighbor in $B$, showing that clause $C_j$ is satisfied by the truth assignment.
See the following figure for an example:
