I know the following statement is false and I would like to know how to disprove the following statement:
If $24|x^2$, then $24|x$.
Is giving a counter example enough? Like this:
Let $x = 12$, then $x^2 = 144$
So, $144/24 = 6$ but $12/24 = 0.5$. Hence the statement is false.
Is this a right way of disproving this? Or do I need to write proof? Please help.
Yes, this works to disprove a universally quantified statement because you have shown the negation of the universally quantified statement is true.
Let's rewrite the conditional statement
if $24\mid x^2$, then $24\mid x$
as $\forall x, 24\mid x^2 \Rightarrow 24\mid x$.
To disprove such a statement (which is universally quantified since the claim is for all $x$) we need only to show
$\neg(\forall x, 24\mid x^2 \Rightarrow 24\mid x)$
which is to say
$\exists x, 24\mid x^2 \land 24\not\mid x$.
Or in words, that there exists an $x$ for which this conditional statement is false.