The solid line is f(x), the dashed line is g(x).
Task: I must find what g(x) is in terms of f(x).
My answer is 2/3f(x)+3, but the answer sheet says 1/2f(x)+3. What I did was first write down f(x)+3 to account for vertical shift of the solid line (f(x)). Since the solid line is shifted up 3, its (6, 6) and (-6,6) coordinates are now (6, 9) and (-6, 9). Since g(x)'s coordinates are (6, 6) and (-6, 6), the vertical stretch of f(x) is thus 2/3. How am I wrong???

Considering the right half (x >=0)
two point form of straight line passing through (x1,y1) and (x2,y2)
y= (y2 - y1)/(x2 -x1) (x -x1)
the equation of straight line in solid line is y = x as it passes through (0,0) and (6,6)
now the transformation passes through (6,6) and (0,3)
use two point form to find equation to get
y = x/2 + 3
hence transformation is
f(x)/2 + 3