Let's say you have a function called f(x) which is equal to 4x2 + 3x + 5
Now let's say you have another function called g(x) which is equal to 2x + 3
Now to find the composition f and g ((f ° g)(x)) you need to substitute the x value in the function f(x) with the function g(x).
You will get 4(2x + 3)2 + 3(2x + 3) + 5. You can further simplify this if needed, but that is what (f ° g)(x) equals.
On the other hand, if you want to find (g ° f)(x) then you would need to substitute the x value in the function g(x) with the function f(x).
You will get 2(4x2 + 3x + 5) + 3 and you can simplify this if needed.
That is the basics of compositions of functions.