The definition
[tex]f(x)=6[/tex]
means that f always outputs 6, no matter the input. So, if you want to compute the composition
[tex](f\circ g)(x)[/tex]
It means that you want to compute f giving as input the result of g(x):
[tex](f\circ g)(x) = f(g(x))[/tex]
But no matter the input: [tex]f(\cdot)[/tex] is always 6! So, we have
[tex](f\circ g)(x) = f(g(x)) = 6[/tex]
for every possible x.