find a solution of 9x = 24 (mod 21) I need help finding a solution of $9x\equiv {24}\pmod {21}$.

Here is what I tried, but it's wrong.

mod x is the positive value of x. mod $21 = 21.$

$9x\equiv {24}\pmod {21}$.

$9x = 24*21$

$x = 24*21/9 = 56$
I'm not sure what you mean by "mod x is the positive value of x", but you should not multiply $24$ and $21$.  What you want is a number $x$ such that $21$ will divide $9x - 24$.  We write this as $21 \mid 9x - 24$.  Note that $3$ divides both sides, so it must be that $21/3 \mid (9x - 24)/3$ or $7 \mid 3x - 8$.  From there you can try and calculate an inverse to $3$ modulo $7$ or you can just do a little guess and check to find that $x = 5$ works.
By trial and error method:
\begin{align*}
9x &amp;\equiv24\mod21\\
\implies 3x&amp;\equiv24 8\mod7  \text{ (dividing by} 3)\\
\implies 7 &amp;| (3x-8)
\end{align*}
(Put the values: $x=0,1,2,3,4,5\cdots$ or $-1,-2,-3,-4,-5\cdots$ and check it.
So for the value $x=5$ or $-2$  it satisfies $7 | (3x-8).$)

Thus $x\equiv5\mod7$ or $x\equiv-2\mod7.$ This implies $x\equiv5\mod7.$

[Hint: For  entrance exams, put the given options directly and check it.]
©by Ramesh Bhat, Nakre