Let f(t) = number of people who have heard the rumour t days after today. This means t = 0 for today. So,
at t = 0, f(0) = 40
at t = 1, f(1) = 3 x 40
at t = 2, f(2) = 3 x 3 x 40
at t = 3, f(3) = 3 x 3 x 3 x 40
you will notice that the number of 3s multiplied together equals the value of t, so more generally:
at t = n, f(n) = 3^n x 40 [ie. 3 raised to the nth power or 3 multiplied together n times.]