Is it mathematically correct to write $a \bmod n \equiv b$? This is not a technical question, but a question on whether we can use a particular notation while doing modular arithmetic. 
We write $a \equiv b \bmod n$, but is it right to write $a \bmod n \equiv b$? 

It is often correct.  $\TeX$ distinguishes the two usages: the \pmod control sequence is for "parenthesized" $\pmod n$ used to contextualize an equivalence, as in your first example, and the \bmod control sequence is for "binary operator" $\bmod$ when used like a binary operator (in your second example). 
But in the latter case, you should use $=$, not $\equiv$.  $7\bmod4 = 3$, and the relation here is a numeric equality, indicated by $=$, not a modular equivalence, which would be indicated by $\equiv$.
