Question: Integrate $\int\frac{xe^{2x}}{(1+2x)^2}dx$

$u= 1+2x$

$du= 2 dx$

Now I saw a solution where a person took $xe^{2x}$ all together and used it as "du" but I did not understand how they were allowed to do that.

If "u" must consist of the first function of this mnemonic: L-I-A-T-E

L: Logarithmic Function 

I: Inverse Function 

A: Algebraic Function 

T: Trigonometric Function 

E: Exponential Function 

Keep in mind I am only allowed to use Integration by Parts.

Answer: 
If one is restricted here as suggested in the OP, then we proceed as follows.

First, let $u=e^{2x}$ and $v=\frac{1}{4(2x+1)}+\frac14 \log(2x+1)$. So, $du=2e^{2x}$ and therefore we have

$$\begin{align}
\int \frac{xe^{2x}}{(1+2x)^2}\,dx&=\frac{e^{2x}}{4(2x+1)}+\frac14 e^{2x}\log(2x+1)\\\\
&-\int \frac{e^{2x}}{2(2x+1)}\,dx-\frac12 \int e^{2x}\log(2x+1)\,dx \tag 1
\end{align}$$ 

Now, we integrate by part the first integral on the right-hand side if $(1)$ by setting $u=e^{2x}$ and $v=\frac14 \log(2x+1)$. So, $du=2e^{2x}\,dx$ and therefore we have

$$\begin{align}
\int \frac{xe^{2x}}{(1+2x)^2}\,dx&=\frac{e^{2x}}{4(2x+1)}+\frac14 e^{2x}\log(2x+1)\\\\
&-\left(\frac14 e^{2x}\log(2x+1)-\frac12\int e^{2x}\log(2x+1)\,dx\right)-\frac12 \int e^{2x}\log(2x+1)\,dx\\\\
&=\frac{e^{2x}}{4(2x+1)}+C
\end{align}$$ 

---

**NOTE:**

In using integration by parts, We are free to choose the $u$ and the $v$ functions. So, $u=xe^{2x}$ is perfectly acceptable and actually facilitates analysis. Let's see how to proceed. 

If we let $u=xe^{2x}$, then $v=\frac{-1}{2(2x+1)}$. Proceeding, we have $du=(2x+1)e^{2x}\,dx$. Therefore, 

$$\begin{align}
\int \frac{xe^{2x}}{(1+2x)^2}\,dx&=\frac{xe^{2x}}{2(2x+1)}-\int \frac{-1}{2(2x+1)}(2x+1)e^{2x}\,dx\\\\
&=\frac{xe^{2x}}{2x+1}+\frac{e^{2x}}{4}+C\\\\
&=\frac{e^{2x}}{4(2x+1)}+C
\end{align}$$
Consider the integral as presented by the proposer:
$\int\frac{xe^{2x}}{(1+2x)^2}dx$ with $u = 1 + 2x$. This leads to
\begin{align}
\int\frac{xe^{2x}}{(1+2x)^2}dx &= \frac{1}{2} \, \int \left(\frac{u-1}{2} \right) \, e^{u-1} \, \frac{du}{u^{2}} \\
&= \frac{1}{4e} \, \int \left( \frac{e^{u}}{u} - \frac{e^{u}}{u^{2}} \right) \, du \\
&= \frac{1}{4e} \, \left[ Ei(u) - \left( Ei(u) - \frac{e^{u}}{u} \right) \right] + c\_{0} \\
&= \frac{e^{u-1}}{4 \, u} + c\_{0} \\
&= \frac{e^{2x}}{4 \, (1+2x)} + c\_{0}. 
\end{align}
Note that $Ei(x)$ is the Exponential integral. 

This solution produces the same solution as that presented by Dr.MV