Given that for all values of x,
f(x) = 3x + p
g(x) = px + 4
and fg(x) = 6x + 9
where p and q are constants.
Work out the values of p and q.