How do you solve the first problem? (About the geometric series, and finding the first term and common ratio)

Answer:
First term = 5.
Common ratio = -3.
Step-by-step explanation:
Third term = a1 r^2 = 45. As r is an integer 3 or -3 is a possible value of r.
If r = 3 then the first term a1 = 45 / 9 = 5.
Substitute a1 = 5 and r = 3 into the formula for the sum of 7 terms which is given as 2735.
Try r = 3:
S7 = 5 * (3^7 - 1) / (3 - 1) = 5465 so r can't be equal to 3.
Try r = -3:-
If r = -3 then a1 = 5 so
S7 = 5 * ((-3)^7 - 1) / (-3-1)
= 5 * 547
= 2735 which is the value given.
So r = -3 and a1 = 5.