If there are $n$ questions on the test, then the probability of answering exactly $k$ correctly, if answers are chosen at random, is
$$\binom{n}{k}\left(\frac{1}{3}\right)^k \left(\frac{2}{3}\right)^{n-k}.$$
And it is the Muliplication Rule. To make typing simpler, I will take $k=2$, $n=5$. Write $C$ for correct, $N$ for not correct.
By the Multiplication Rule, the probability of $CCNNN$ (first two right, next three wrong) is $(1/3)^2(2/3)^3$. But we can also get two right, three wrong in several other ways, like $CNCNN$, $CNNCN$, and so on. Each has probability $(1/3)^2(2/3)^3$.
How many such strings are there? We have to choose $2$ places from the $5$ available to put a $C$ into. There are $\binom{5}{2}$ ways to do this, giving total probability $\binom{5}{2}(1/3)^2(2/3)^3$.
The same reasoning gives the general formula quoted above.
Remark: If there are only $5$ questions on the test, and we want the probability of answering all $5$ correctly, the probability is $(1/3)^5$, which is nowhere near the number quoted.
Because the formula for the probability has only $3$'s in the denominator, any probability we compute will have to be of shape $\frac{m}{3^e}$, where $m$ and $e$ are non-negative integers. The number $\frac{45}{118}$ is not of that shape, so cannot be the answer for the problem, or for any closely related problem.
2.
Let's look at the number of ways that a student can get $x$ answers correct. Clearly, they can get all 8 answers correct in only 1 way. To determine the number of ways a student can get 7 correct you can choose the 7 they get, then choose 1 from the remaining 22: ${8\choose 7}{22\choose 1}$. For the number of ways for a student to get 6 correct it's ${8\choose 6}{22\choose 2}$, etc. So if $X$ is a random variable representing how many answers a student got right,
$$p_X(x)={{8\choose x}{22\choose 8-x}\over{30\choose 8}}$$
Which is just the hypergeometric distribution with $K=8,N=30,$ and $n=8$. So the mean is $$n\frac{K}N=\frac{64}{30}$$and the variance is $$n\frac{K(N-K)(N-n)}{N^2(N-1)}=8\frac{8(30-8)(30-8)}{30^2(30-1)}=\frac{30976}{26100}$$
3.
There may be 4, 5, 6, 7, or 8 out of the 20 answers that are correct. I'm going to assume that, whatever the case, the student still gets 8 choices. The method I would use to determine the mean and variance of the number of correct responses made by a student would be to make a probability mass function for each of the five possible quiz designs (by which I mean quizzes with 8, 7, 6, 5, or 4 distinct correct responses). Let's call these functions $p_i(x)$, where $i$ is the number of distinct correct responses in the quiz. Then, assuming each of the 5 quiz designs is equally likely, the total probability mass function would be
$$p_X(x)=\frac15p_8(x)+\frac15p_7(x)+\frac15p_6(x)+\frac15p_5(x)+\frac15p_4(x)$$
If the 5 quiz designs aren't equally likely you could of course adjust the weights on the $p_i(x)$'s to reflect that. With this function found you could find the mean and variance as you usually do for discrete random variables.
It looks like quite a task to completely find each of the $p_i(x)$'s, so instead of doing that I'll find a few of the values from a couple of them to illustrate the logic.$$\\$$
$\mathbf{p_8(x)}$:
If there were 8 distinct correct answers, then this would be hypergeometrically distributed as above but with $N=20$.
$\mathbf{p_7(x)}$:
If there were 7 distinct correct answers, then one of them would be the correct response to 2 of the questions. Let's call that one the 'double' response and the others 'single' responses. The number of ways of getting all 8 questions correct is the number of ways of choosing all 7 of these in 8 guesses, $$p_7(8)={{7\choose 7}{13\choose 1}\over {20\choose8}}$$A student can only score 7 out of 8 by getting the 'double' response and 5 of the others, so $$p_7(7)={{1\choose 1}{6\choose 5}{13\choose 2}\over{20\choose8}}$$A student can score 6 out of 8 by getting all six of 'singles' or by getting the 'double' and four of the 'single' answers, which means $$p_7(6)={{1\choose 0}{6\choose6}{13\choose2}+{1\choose1}{6\choose4}{13\choose3}\over{20\choose 8}}$$
$\mathbf{p_6(x)}$:If there were 6 distinct correct answers, then two of them would be 'double' solutions and four would be 'single' solutions. To get 4 out of the 8 questions correct a student could get none of the double solutions and all four of the singles, one double and two singles, or both doubles, so $$p_6(4)={{2\choose 0}{4\choose 4}{14\choose 4}+{2\choose 1}{4\choose 2}{14\choose 5}+{2\choose 2}{4\choose 0}{14\choose 6}\over{20\choose8}}$$
Similar logic should get you all the values for all the $p_i(x)$'s. And, as said above, with those found you would be able to calculate the mean and variance.
Best Answer
Hint. We need at least 3 correct answers out of $6$ (and the order does matter). Hence the probability is $$p=\sum_{k=3}^6\binom{6}{k}(\frac{1}{4})^k(\frac{3}{4})^{6-k}=\frac{20\cdot 3^3+15\cdot 3^2+6\cdot 3+1}{4^6}=\frac{347}{2048},$$ where $k$ is the number of correct answers, $\binom{6}{k}$ is the number of ways to select them.