Ok I get it, its asking the vertical line distance in terms of variable x.
Thats fine then, ok the vertical distance between variable points:
(x,\frac{mx+6}{3}) \ \ \ (x, \ln(x+1))
Is given by distance formula:
D^2=(x-x)^2+(\frac{mx}{3}+2-\ln(x+1)) \\ \\ D=\frac{mx}{3}+2-\ln(x+1) \\...