One way to write chemical or mathematical equations is to press Insert and then Equation. A new toolbar will be added at the top left. Pull the drop-down menu next to each item to view the various Math symbols. That will allow you to create mathematical or chemical equations including subscripts and superscripts.
Another way to do it, if you only need subscripts and superscripts is to press Format and then select Subscript or Superscript.