The original equation had a y-int of 6, but g(x) has a y-int of -4. Moving the line 5 units to the right will move the y-int down 10 units due to the positive slope of 2, so the translation is 5 units right.
The line shown still has a slope of 2 and a y-intercept of -4, so using the equation y = mx + b, g(x) = 2x - 4.