No fixed answer here but I've come up with 2 equations below.
Linear equations come in the form of y=mx+c,
where m is the gradient and c is the y-intercept.
Let's say I want my gradient to be 2.
Then, y= 2x+c
Next substitute the coordinates of the given point.
When x=2, y=4,
4=2(2)+c
c= 4-4= 0
so, your equation would be y=2x
Now, I want my gradient to be 1/2
y=1/2 x+ c
when x=2, y=4,
4= 1/2 (2) + c
4= 1 + c
c= 3
Thus, the equation is y= 1/2 x + 3
You can play around with the gradient to give you different equations. Hope that you understand my explanation!