Finding a new function given a composite function (Case B : Second function is given) Example 2

Example 2 (Substitution Method)

A function f is defined by f:xx1  .
Find the function g if gf:x 4 x+2 ,x2  .

[Note : Second function is given , use substitution y=x-1