Given is the density $$f(x)=\begin{cases} \frac{3}{2}x-\frac{3}{4}x^2&\mbox{if }x \in (0,2) \\ 0&\mbox{else}\end{cases}$$
As practice, I like to know if I formed this correctly into a distribution function?
If $x<0$ then $$F(x)=\int_{-\infty}^{x}f(t)dt=\int_{-\infty}^{x}0 dt=0$$
If $0<x\leq2$ then $$F(x)=\int_{-\infty}^{x}f(t)dt=\int_{-\infty}^{0}0 dt + \int_{0}^{x}\frac{3}{2}t-\frac{3}{4}t^2 dt = \left[\frac{3}{4}t^2-\frac{1}{4}t^3\right]_{0}^{x}=\frac{3}{4}x^2-\frac{1}{4}x^3$$
If $x>2$ then $$F(x)=\int_{-\infty}^{x}f(t)dt=\int_{-\infty}^{0}0 dt + \int_{0}^{2}\frac{3}{2}x-\frac{3}{4}x^2dt + \int_{2}^{\infty}0 dt = \left[\frac{3}{4}t^2-\frac{1}{4}t^3\right]_{0}^{2}=1$$
Thus the distribution function is
$$F(x)=\begin{cases} \frac{3}{4}x^2-\frac{1}{4}x^3&\mbox{if }0<x\leq 2 \\ 1 &\mbox{if }x>2\\ 0 &\mbox{if }x<0\end{cases}$$
Your working seems fine.
We can verify by differentiating the CDF to check that we get back the pdf, also note that
$\lim_{x \to -\infty} F(x) = 0$ and $\lim_{x \to \infty} F(x) = 1$