I don't how to write the powers or the exponents and the other mathematical expressions
You write exponents like so:
$\$$(base of exponent)^(power)$\$$
For example, 2 to the power of 5 would be written as $\$$2^5$\$$. That looks like $2^5$
I recommend reading the MathJax tutorial for a full guide on how to type these symbols.