How do I solve this RSA instance for m? How we can solve this equation and get the value of M?

$$8 = M^{13} \mod 33$$

not a computer program, but a mathematical operation.
Factor the modulus, $n$ which was given as 33, to yield $p = 3$ and $q = 11$.

The totient, $\phi$ is $(p - 1)(q - 1) = 20$.

The public exponent, $e$ is given as $13$.

Now compute the private exponent $d$ as the multiplicative inverse of $e \mod \phi$, so
$e^{-1}\mod \phi \equiv 17$.

The cipher text, $c$ is given as 8.

Finally compute the message, $M$ as $c^d \mod n \equiv 2$.

No algorithm has been published for factoring large numbers quickly, so the first step is what makes breaking RSA "computationally infeasible." Fast algorithms are known for all of the other operations.