Your notation is sloppy - it is unclear if the prime refers to differentiation with respect to x, g or t for example. Convention would say t... but that's not what you mean. You have t=g(x) in the numerator and kept g(x) in the denominator: make up your mind! But why prefer t over u anyway: does it matter if you write t=g or u=g?
Tidying up:
$$\int f(g(x))dx = \frac{\int f(u)du}{u^\prime}$$ What you have done seems to be exactly the u substitution... you just used a t instead of a u in the numerator and kept the g in the denominator. Its still messy because of the prime. A tidier form would be to get rid of the u completely and use Liebnitz notation to make the differentiation explicit: $$\int f(g(x))dx = \frac{\int f(g)dg}{dg/dx}$$ ... it's still hardly just one step.
The only reason for favoring g over u here is because the initial problem was expressed in terms of g. But there is another problem: how do we justify taking the denominator outside the integration? It may depend on the variable being integrated over!
Then there's the example: have you tried evaluating the integral by u-substitution to check it's the same?
$$\int e^{x+3x^2}dx$$You'd do: ##u=x+3x^2 \Rightarrow du = 6xdx## uh-oh?!
Surely: $$\int e^{x+3x^2}dx=\frac{\sqrt{\pi}}{2\sqrt{3} \sqrt[12]{e}}\text{erfi} \left [ \frac{6x+1}{2\sqrt{3}} \right ] + c$$
We don't have to go for such a complicated function ... consider:
$$\int (x^2+1)^2dx$$ ... this is the sort of thing we'd normally evaluate via a trig substitution or just expanding it out - but it has form f(g(x)) so perhaps $$\int (x^2+1)^2dx=\frac{\frac{1}{3}(x^2+1)^3}{2x}$$ ... but it's actually $$\int (x^2+1)^2dx=\frac{x}{15}(3x^4+10x^2+15)$$ ... the reason is that when you do the substitution, you get ##du=2xdx=2\sqrt{u-1}## which means that we cannot take the differentiation outside the integration sign. $$\int (x^2+1)^2dx \rightarrow \int \frac{u^2du}{\sqrt{1+u}}$$
The formula you are looking for is: $$\int f(g(x))dx = \int \frac{f(u)du}{\left ( \frac{dg}{dx} \right )(u)}$$... which is to say that the derivative of g wrt x has to be written in terms of u so it can take part in the integration.
This form of substitution is most useful when you notice the integrand has form: ##g^\prime(x)f(g(x))dx=f(g)dg##