The first 3 terms are a, ar and ar^2
so a + ar + ar^2 = 7a
a + ar + ar^2 + ar^3 = 45
7a + ar^3 = 45
a(7 + r^3) = 45
a = 45/(7 + r^3)
Because we know the sequence are positive integers r must be a natural number.
(7 + r^3) is a factor of 45 [ie 1, 3, 5, 9, 15, 45]
so r = 2 because 7 + 2^3 = 15 is the only factor possible
a = 45/15 = 3