Example 2

Given f : x 1 x and g : x p x 2 + q . If the composite function gf is defined by g f : x 3 x 2 6 x + 5 , find

  1. the value of p and of q,
  2. the value of g 2 ( 1 ) .