X is partly constant and partly varies as y when y is 2 x is 30 and when y is 6 x is 50 find the relationship of x and y

y = m x + b (line)

2 = m(30) + b
6 = m(50) + b
-------------------- subtract
-4 = -20 m
m = 1/5
2 = 30/5 + b = 6+b
b = -4
so
y = (1/5) x - 4
or
5 y = x - 20