Sorry, but you're off kilter.
Actually, this is a rather tough integral for someone starting out with integration.
Of course, there are more than one way to approach it, but a good method would be to use the sub tkh mentioned. That sub even has a name. It's called the Weierstrass substitution.
After you make your subs, there can be no more x's involved.
If we write the sub tkh mentioned as \(\displaystyle x=2tan^{-1}(u), \;\ dx=\frac{2}{u^{2}+1}du\)
we get:
\(\displaystyle \frac{2-sin(2tan^{-1}(u))}{2+sin(2tan^{-1}(u))}\)
Now, you have to be familiar with how these things reduce.
For instance, \(\displaystyle sin(tan^{-1}(u))=\frac{u}{\sqrt{u^{2}+1}}\)
Therefore, \(\displaystyle sin(2tan^{-1}(u))=\frac{2u}{u^{2}+1}\)
This transforms the integral to:
\(\displaystyle \displaystyle\int\frac{u^{2}-u+1}{u^{2}+u+1}\cdot \underbrace{\frac{2}{u^{2}+1}}_{\text{dx}}du\)
Using partial fractions it becomes:
\(\displaystyle \displaystyle 4\int\frac{1}{u^{2}+u+1}du-2\int\frac{1}{u^{2}+1}du\)
Now, tackling these is another matter. The one on the right is standard and involves arctan.
The one on the left also involves an arctan, but is a little more involved. Completing the square may prove useful, along with a trig sub.
You could even write it as \(\displaystyle \frac{4}{sin(x)+2}-1\) and try proceeding from there.
As I said, there are various ways once you get skilled at integrating.