[tex]f(x) = 2x + 1[/tex]
[tex]g(x) = x ^{2} + 3x + 7[/tex]
With these 2 equations all we have to do is just substitute it for f and get
[tex]2x + 1(x {}^{2} + 3x + 7)[/tex]
Then just apply the distributive property
Just in case see if there are other ways of doing it