"In a function f where f(x)=kx+m the following applies;

f(x+4)-f(x)=2

f(m)=6

Decide the function f "

How do I solve this? Preferably step by step.

f(x)=kx+m

f(x+ 4) - f(x) = [ k (x + 4) + m] - [kx + m] = 2

So

kx + 4k + m - kx - m = 2

4k = 2

k = 1/2

And f(m) = 6

f(m) = (1/2) (m) + m = 6

(3/2)m = 6

m = 4

So....the function is

f(x) = (1/2)x + 4

Thanks! I really don't understand functions