Given,
a) The value of g is 18 when t is 3.
It is given that g is directly proportional to t.
According to the question,

Here, k is proportionality constant.
Substitutitng the value of t and g in the above expression then,

The value of g when t is 5,

Hence, the value of g is 30 when t = 5.
b)The value of z is 5 when the value of r is 4.
It is given that z is inversely proportional to r+3.
According to the question,

Here, k is proportionality constant.
Substitutitng the value of t and g in the above expression then,

The value of r when z is 9,

Hence, the value of r is 8/3 when z=9.