If \boxed{} is not supported in your MathJax environment, you can try \fbox{}.
Here is an example:
\fbox{$ 2x + y = 14 $}
The outer \fbox{} creates a box around the content. The inner $ ... $ ensures that the mathematical expression is processed correctly. Without the dollar signs, \fbox{} would treat the content as plain text, causing MathJax to not render it as math. Therefore, whenever using \fbox{} for math expressions in MathJax, always enclose the expression in $...$ to ensure proper rendering.