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

Example 1 (substitution Method)

A function f is defined by f:xx+2  .
Find the function g if gf:x x 2 +3x+5  .

[Note : Second function is given, use substitution y=x+2]