Let's start by visualising this concept.
Number of grains on square:
1 2 4 8 16 ...
We can see that it starts to form a geometric sequence, with the common ratio being 2.
For the first question, we simply want the fifteenth term, so we just use the nth term geometric form:
Thus, there are 16, 384 grains on the fifteenth square.
The second question begs the same process, only this time, it's a summation. Using our sum to n terms of geometric sequence, we get:
Thus, there are 32, 767 total grains on the first 15 squares, and you should be able to work the rest from here.