The 4th partial sum of the sequence is the sum of the first 4 terms:
S₄ = a(1) + a(2) + a(3) + a(4)
Because the sequence is geometric, any term can be written in terms of the previous one:
a(n) = r a(n - 1)
and, more importanly, in terms of the first term a(1), so that
a(2) = r a(1)
a(3) = r a(2) = r ² a(1)
a(4) = r a(3) = r ³ a(1)
Then the 4th partial sum is
S₄ = a(1) + r a(1) + r ² a(1) + r ³ a(1)
S₄ = a(1) (1 + r + r ² + r ³)
With a(1) = 18 and r = 2, we have
S₄ = 18 (1 + 2 + 4 + 8) = 270