In order to do this, you will need access to the MathJax ElementJax
object for the mathematics. You can get that via
MathJax.Hub.getJaxByInputType("math/tex")
which returns an array of all the element jax that come from TeX
input. You step through the array, or obtain the element by index.
If there is a specific element that contains the math, you can pass
that as a second parameter to getJaxByInputType(). For example, if
there is a single math expression containing in a DIV with
id="MathOutput", then
var jax = MathJax.Hub.getJaxByInputType("math/tex","MathOutput")[0];
will get you the ElementJax for that expression.
Then use
jax.SourceElement().text
to get the original text.
Davide