You should also note that static friction acts on the body when it is about to topple. Friction acts along the ground so it's torque about A is also 0.
Torque due to F is clockwise and torque due to mg is counter-clockwise. Since torque= lever arm * force (or in vector form $\vec{\tau}=\vec{r}x\vec{F}$), torque due to mg is $mg\frac{a}{2}$. So net torque is $Fb-mg\frac{a}{2}$ in the clockwise about A.
A more detailed analysis:
Since the block is right now in equilibrium, balancing forces along the horizontal and vertical :$F=f, N=mg$.
Now balancing the torque about the center of mass of the body, torque due to $mg$ is 0 (moment arm is 0), due to $N$ is $N\frac{a}{2}$ and due to $F$ and $f$ is $F\frac{b}{2}$ and $f\frac{b}{2}$ respectively. Using the relations mentioned above, you can see that the expression for the net torque remains the same.
You can try this yourself for any point you wish to consider. (Since the net force on the block is 0, the expression for torque will be same for all points).