Rather than type cell addresses you can point and click the cells you want to include in your formula. This will open a new toolbar with a bunch of characters like Greek letters Math operators and arrows etc. Type the equals sign.
Make sure the cursor is placed in text where you want superscript or subscript to show.
First lets enable the equation editor. Open up your Google Doc as you normally would. Search or scroll through the list until you see g Math. The first step is to open a Google Document and click Insert.