I'm trying to understand why this is true:

Since $K(x)$ is a field, $K(x)$ is an UFD, then $K(x)$ can be written uniquely as products of irreducible elements of $K(x)$.
I didn't understand why we can write this product as polynomials in $K[x]$ instead of just elements in $k(x)$.
Thanks in advance.
Saying a field is a UFD is rather vacuous: there are no irreducible elements, since irreducible elements are nonzero non-units and in a field the only non-unit is zero.
Again, we can rather vacuously write an element of $K(x)$ as a product of elements in $K(x)$, indeed $f(x)\in K(x)$ can be written as "$f(x)$" which is just one thing. There is absolutely no information conveyed by this fact. The representation in 1.1 is an even stronger statement simply by virtue of actually conveying interesting information; it says that elements in $K(x)$ can be written as ratios of products of irreducible elements of the polynomial ring $K[x]$ unique up to scalars from $K$.
The equation isn't talking about the fact that $K(x)$ is a UFD, it's talking about the facts that $K(x)$ is the fraction field of $K[x]$ and $K[x]$ is the UFD. That's the significance of the representation. The reason it's true is that the field of all rational functions in $x$ is the smallest field containing $x$ (easy to check), and any rational function in the transcendental $x$ can be factored into irreducibles (simply factor its numerator and its denominator).
Consider thinking along the same lines with $\Bbb Q$ and $\Bbb Z$. Sure, every element of $\Bbb Q$ is a product of elements of $\Bbb Q$, but that's boring and "duh." A more interesting fact we know is that every rational number looks like $\epsilon p_1^{e_1}\cdots p_r^{e_r}$ for some unit $\epsilon\in\Bbb Z^\times$, irreducibles (primes) $p_1,\cdots,p_r\in\Bbb Z$ and exponents $e_1,\cdots,e_r\in\Bbb Z$.