Help with Answer to question 4 part a & b

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,
[tex]\begin{gathered} g\propto t \\ g=kt \end{gathered}[/tex]Here, k is proportionality constant.
Substitutitng the value of t and g in the above expression then,
[tex]\begin{gathered} 18=k(3) \\ k=\frac{18}{3} \\ k=6 \end{gathered}[/tex]The value of g when t is 5,
[tex]\begin{gathered} g=kt \\ g=6\times5 \\ g=30 \end{gathered}[/tex]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,
[tex]\begin{gathered} z\propto\frac{1}{r+3} \\ z=\frac{k}{r+3} \end{gathered}[/tex]Here, k is proportionality constant.
Substitutitng the value of t and g in the above expression then,
[tex]\begin{gathered} 5=\frac{k}{4+3} \\ 5=\frac{k}{7} \\ k=5\times7 \\ k=35 \end{gathered}[/tex]The value of r when z is 9,
[tex]\begin{gathered} z=\frac{k}{r+3} \\ 9=\frac{35}{r+3} \\ r+3=\frac{35}{9} \\ r=\frac{35}{9}-3 \\ r=\frac{35-27}{3} \\ r=\frac{8}{3} \end{gathered}[/tex]Hence, the value of r is 8/3 when z=9.