There are a lot of good proofs already available for this question here, but I am trying to write the proof on my own. It'll be a great help if I can get an idea whether my proof is right or not.
$Proof.$ The given statement is equivalent to its contrapositive.
$$If\;\sqrt{pq}\;is\;rational\;then\;p\;or\;q\;is\;composite\; or\; p = q$$
$\sqrt{pq}$ is rational only when $pq$ is a perfect square.
Every natural number can be written as a product of its prime factors.
So, $p = p_1^{r_1} p_2^{r_2} p_3^{r_3}...$, where $p_i$ represent a prime and $r_i$ represent its power.
Similarly, $q = p_1^{s_1} p_2^{s_2} p_3^{s_3}...$, where again $p_i$ represent a prime and $s_i$ represent its power.
Each $r_i \geq 0$ and $s_i \geq 0$. Also, the above series will be finite as $p$ and $q$ are finite.
So, $pq = p_1^{r_1 + s_1} p_2^{r_2 + s_2} p_3^{r_3 + s_3}...$
Now, $pq$ can be a perfect square only when for each $p_i$, $r_i + s_i$ is even.
Now, let us take $p\; or\; q\; is\; composite\; or \; p = q$ to be false, i.e $p\; and\; q\; both\; must\; be\; distinct\;prime$ is the true statement.
Now, if $p$ and $q$ are prime then $$p = p_k^{r_j}$$where $p_k = p$ and $r_j = 1$.
Similarly, $$q = p_l^{s_t}$$where $p_l = q$ and $s_t = 1$.
Hence, $pq = p_k^{r_j}p_l^{s_t}$, where both $r_j$ and $s_t$ are odd and $gcd(p_k, p_l) = 1$, which means $pq$ is not a perfect square and hence irrational.(a contradiction).
So, $p\; or\; q\; is\; composite$ is true, which implies
$$If\; \sqrt{pq}\;is\;rational \;then \;p \;or\; q \;is\; composite.$$
Hence, proved.