The composition of functions \( (f \circ g)(x) \) means applying \( g(x) \) first and then applying \( f \) to the result. Similarly, \( (g \circ f)(x) \) means applying \( f(x) \) first and then applying \( g \) to the result.
Given:
- \( f(x) = x^2 + 5 \)
- \( g(x) = x^2 - 5 \)
To find \( (f \circ g)(x) \), substitute \( g(x) \) into \( f(x) \):
\[
(f \circ g)(x) = f(g(x)) = f(x^2 - 5) = (x^2 - 5)^2 + 5
\]
Now, expand \( (x^2 - 5)^2 \):
\[
(x^2 - 5)^2 = x^4 - 10x^2 + 25
\]
Substitute back into the expression for \( f(g(x)) \):
\[
f(g(x)) = x^4 - 10x^2 + 25 + 5 = x^4 - 10x^2 + 30
\]
To find \( (g \circ f)(x) \), substitute \( f(x) \) into \( g(x) \):
\[
(g \circ f)(x) = g(f(x)) = g(x^2 + 5) = (x^2 + 5)^2 - 5
\]
Now, expand \( (x^2 + 5)^2 \):
\[
(x^2 + 5)^2 = x^4 + 10x^2 + 25
\]
Substitute back into the expression for \( g(f(x)) \):
\[
g(f(x)) = x^4 + 10x^2 + 25 - 5 = x^4 + 10x^2 + 20
\]
First, find \( g(3) \):
\[
g(3) = 3^2 - 5 = 9 - 5 = 4
\]
Now, find \( f(g(3)) = f(4) \):
\[
f(4) = 4^2 + 5 = 16 + 5 = 21
\]
- \( (f \circ g)(x) = \boxed{x^4 - 10x^2 + 30} \)
- \( (g \circ f)(x) = \boxed{x^4 + 10x^2 + 20} \)
- \( (f \circ g)(3) = \boxed{21} \)