That's pretty straightforward- if you know the definitions. The "nth" term of a geometric series with first term a and common ratio r is . Knowing that the second term is 24 tells you that and knowing that the 5th term is 3 tells you that . That gives you two equations to solve for a and r. In particular, if you divide the second equation by the first,

Once you know r, it is easy to use to find a.

And, once you know both a and r, the "sum to infinity" is just