Suppose y varies directly with x.When x is 7,y is 21 Write the equation that relates x and y

Given that y varies directly with x, we have:
[tex]\begin{gathered} y\propto x \\ \Rightarrow y=kx \end{gathered}[/tex]Where k is constant.
When x = 7, y = 21. From here, we can obtain the value of k
21 = 7k
k = 21/7 = 3
Since k = 3, the equation that relates x and y is:
[tex]y=3x[/tex]