Answer
a) $f(x)=2x+3, g(x)=3x+6$
b) $f(x)=x^5, g(x)=x^2$
Work Step by Step
a) Let's note:
$f(x)=ax+b$
$g(x)=cx+d$
Determine $f\circ g$ and $g\circ f$:
$(f\circ g)(x)=f(g(x))=f(cx+d)=a(cx+d)+b=acx+ad+b$
$(g\circ f)(x)=g(f(x))=g(ax+b)=c(ax+b)+d=acx+bc+d$
In order to have $f\circ g=g\circ f$, we must have:
$acx+ad+b=acx+bc+d$
$ad+b=bc+d$
$ad-d=bc-b$
$d(a-1)=b(c-1)$
For example:
$a=2$
$d=6$
$c=3$
$b=3$
$f(x)=2x+3$
$g(x)=3x+6$
b) Let's have:
$f(x)=x^5$
$g(x)=x^2$
Determine $f\circ g$ and $g\circ f$:
$(f\circ g)(x)=f(g(x))=f(x^2)=(x^2)^5=x^{10}$
$(g\circ f)(x)=g(f(x))=g(x^5)=(x^5)^2=x^{10}$