As per Avellaneda and Stoikov market-making model, the HJB equation is defined as

where function $u$ is the value function.
The question is how do derive the 1st HJB equation, which is just the time differential of $du(s,x,q,t)$?
My attempt is to apply Ito lemma on the wealth process directly $$q_{t}S_{t}+X_{t}$$ where $W_t$ is Brownian motion, $N_t^a$ and $N_t^b$ are independent Poisson random variables with intensities $\lambda^a(\delta^a)$ and $\lambda^b(\delta^b)$, which are some decreasing functions of $\delta^a$ and $\delta^b$. $$dS_t=\sigma dW_t$$ $$dq_t=dN_t^b-dN_t^a$$ $$dX_t=p^a dN_t^a-p^b dN_t^b$$ However, applying Ito lemma results in coefficient on $u_{ss}$ becoming $\sigma^{2}\left(N_{t}^{b}-N_{t}^{a}\right)^{2}$, instead of just $\sigma^{2}$. Is this a correct approach? Or perhaps we should apply multidimensional Ito lemma on the system of three processes $dS_t,dX_t,dq_t$, ie $$ \left[\begin{array}{c} dS_{t}\\ dX_{t}\\ dq_{t} \end{array}\right]=\left[\begin{array}{c} \sigma\\ 0\\ 0 \end{array}\right]dW_{t}+\left[\begin{array}{cc} 0 & 0\\ p^{a} & -p^{b}\\ -1 & 1 \end{array}\right]\left[\begin{array}{c} dN_{t}^{a}\\ dN_{t}^{b} \end{array}\right] $$