nth term of a G.P. is given by ar^(n - 1); where a is the first term.
4th term => 27 = ar^(4 - 1) = ar^3 . . . (1)
7th term => 1 = ar^(7 - 1) = ar^6 . . . (2)
7th term/4th term => 1/27 = ar^6/ar^3 = r^(6 - 3) = r^3
r^3 = 1/27
r = 1/3
From (1), a(1/3)^3 = 27
1/27 a = 27
a = 27 x 27 = 729
Therefore, the first term is 729.