we know that
A relationship between two variables, x, and y, represent a direct variation if it can be expressed in the form
or

In this problem we have
Points
and

so
Find the value of k
First point


Second point


the function is
--------> substitute the value of k

therefore
the answer is

In this problem with a single point was sufficient to calculate the equation, since in a direct variation the line passes through the origin, it is not necessary to use the formula of the slope