First, break down this problem into parts. I would break down the problem into Amy's friends, friends of Amy's friends, and friends of friends of Amy's friends.
The first part is easiest, she invites three friends, so all the people Amy invites = 3 = 3^1 where the ^ means that 1 is the exponent.
Next, friends of Amy's friends. Amy has three friends who each invite three friends, for a total of 9 friends
9=3*3=3^2
Finally, we must look at friends of friends of Amy's friends. Can you see the pattern yet? Each generation of friends adds one to the exponent. This is because each friend asks three more friends, so the number of people previously invited is multiplied by 3.
(3^2) * 3 = (3^2) * (3^1) = 3^(2+1) = 3^3
or, (3^2) * 3 = (3 * 3) * 3= 3*3*3=3^3
So the total number of friends going to Amy's party = 3^1 + 3^2 + 3^3