how would i do this
y=mx+x/2m
Because x is in both terms it can be factored out:
$\displaystyle
y = mx + \frac{x}{2m} = x\left(m+\frac{1}{2m}\right)
$
Divide through to isolate x:
$\displaystyle x = \frac{y}{\left(m+\frac{1}{2m}\right)}$
That can be tidied up by multiplying through by $\displaystyle 2m$
$\displaystyle x = \frac{2my}{2m^2+1}$