Probability using Bayes rule 
Suppose that in answering a question on a true/false test, an examinee either knows the answer with probability $p$ or s/he guesses with probability $1-p$. Assume that if the examinee knows the answer to a question, the probability that s/he gives the correct answer is $1$, and if s/he guesses then s/he only gives the correct answer with probability $0.5$. 
Use Bayes rule to compute the probability that an examinee knew the answer to a question given that s/he has correctly answered it.

First I wrote out all the probabilities from the question.
$$
P(\text{Wrong}) = 0.5 \\
P(\text{Correct}) = 0.5 \\
P(\text{Correct} \mid \text{Known}) = 1 \\
P(\text{Wrong} \mid \text{Known}) = 0 \\
P(\text{Correct} \mid \text{Guess}) = 0.5 \\
P(\text{Wrong} \mid \text{Guess}) = 0.5 \\
$$
I tried creating two equations with two unknowns to get a value of $p$ shown below:
$$
(1)\quad 0.5 = \frac{P(\text{Guess} \mid \text{Correct})\cdot0.5}{1 - p}
$$
$$
(2)\quad 1 = \frac{P(\text{Known} \mid \text{Correct})\cdot0.5}{p}
$$
Then rearranged $(2)$ to get the following:
$$
P(\text{Known} \mid \text{Correct}) = 2p
$$
And $P(\text{Guesses} \mid \text{Correct})$ is equal to $1 - P(\text{Knows} \mid \text{Correct})$ so I substituted that back into $(1)$
$$
(1)\quad 0.5 = \frac{(1 - 2p)\cdot0.5}{1 - p}\\
(1)\quad 0.5 = \frac{0.5 - p}{1 - p}\\
(1)\quad 0.5 - 0.5p = 0.5 - p\\
0.5p = 0\\
p = 0
$$
But this is can't be right, the question is only 5% so doesn't seem like it would be this much work, am I missing something simple here? The main equation that needs to be solved:
$$
P(\text{Known} \mid \text{Correct}) = \frac{P(\text{Correct} \mid \text{Known}) P(\text{Known})}{P(\text{Correct})}
$$
 A: Let's write the question out:
$$
 \mathcal{P}(\text{Knows the answer}) = p \qquad \mathcal{P}(\text{Doesn't know the answer}) = 1-p$$
And 
$$
 \mathcal{P}(\text{Correct} | \text{Knows the answer}) = 1; \;\mathcal{P}(\text{Wrong} | \text{Knows the answer}) = 0$$
$$ \mathcal{P}(\text{Correct} | \text{Doesn't know the answer}) = 0.5; \;\mathcal{P}(\text{Wrong} | \text{Doesn't know the answer}) = 0.5$$
\par The question is to find:
$$\mathcal{P}(\text{Knows the answer} | \text{Correct}) = ? $$
Using Bayes, one finds:
$$\begin{align}\mathcal{P}(\text{Knows the answer} | \text{Correct}) &= \dfrac{\mathcal{P}(\text{Correct} | \text{Knows the answer})\mathcal{P}(\text{Knows the answer)} }{\mathcal{P}(\text{Correct})} \\
&= \dfrac{1\cdot p}{\mathcal{P}(\text{Correct})}
\end{align}$$
Now using the law of total probability,
$$\begin{align}\mathcal{P}(\text{Correct}) &= \mathcal{P}(\text{Correct} | \text{Knows the answer})\cdot \mathcal{P}(\text{Knows the answer}) \\
&+\mathcal{P}(\text{Correct} | \text{Doesn't know the answer})\cdot \mathcal{P}(\text{Doesn't know the answer})\\
& = 1\cdot p+0.5\cdot (1-p) \\
& = 0.5p +0.5
\end{align}$$
Which implies:
$$\begin{align}\mathcal{P}(\text{Knows the answer} | \text{Correct})  &= \dfrac{p}{0.5p+0.5}
\end{align}$$
Notice how when $p=1$ (which implies the examinee knows the answer all the time) then this probability also equals 1. (which makes sense)
To visualize this probability in function of $p$, see the following graph:

A: Question 1:
In answering a question on a multiple-choice test, an examinee either
knows the answer (with probability p), or he Guesses (with probability 1 - p).
Assume that the probability of answering a question correctly is unity for an examinee who knows the answer and 1/m for the examinee who guesses, where m is the number of multiple-choice alternatives. Supposing an examinee answers a question correctly, what is the probability that he really knows the answer?
Solution :
MCQ : m options.
P(KNOWS the correct answer) : p
P(GUESSES the correct answer) : (1 - p)
The probability of answering a question correctly is unity for an examinee who knows the answer.
A = The examinee answers CORRECTLY.
Let K = The examinee KNOWS the answer.
Then , $P(\frac{A}{K}) = 1$
The probability of answering a question correctly is 1/m for the examinee who GUESSES, where m is the number of multiple-choice alternatives.
A = The examinee answers correctly.
Let G = The examinee GUESSES the answer.
Then, $P(\frac{A}{G}) = \frac{1}{m}$
Then, the conditional probability that a man knew the answer to a question, given that he has Correctly answered it, is equal to $P (K | A  ) = P( \frac{\text{Man knew the answer to the Question}}{\text{He has correctly answered it}}) = P(\frac{\text{Man knew the answer to the Question}}{\text{Man knew the answer to the Question OR He Guessed the answer }} )= P(\frac{\text{Man knew the answer to the Question}}{\text{Man knew the answer to the Question + He Guessed the answer }} ) =\frac{p(1)}{p(1) + (1-p)\frac{1}{m}} = \frac{mp}{mp + 1- p}$
Now If we add 1 more condition of Copying. Then, Let us look at this Question
Question 2:
In a test, an examinee, either Guesses Or Copies Or Knows the answer for multiple-choice test having 4 options of which only 1 is correct.The probability that he makes a guess is 1/3 and the probability for copying is 1/6. The probability that his answer is correct given that he copied it is 1/8. Prove that The probability that he knew the answer, given that his answer is correct is 24/29.
Solution :
Let, C be the probability that he will COPY the answer.
C = $\frac{1}{6}$
A = The examinee answers CORRECTLY.
Then, $P(Correct|Copy)  = P(A|C) =(\frac{1}{8})$
The probability of answering a question correctly is 1/m for the examinee who GUESSES, where m is the number of multiple-choice alternatives.
A = The examinee answers correctly.
Let G = The examinee GUESSES the answer. = 1/3 
Then, $P(\frac{A}{G}) = \frac{1}{m} = \frac{1}{4}$
Let K = The examinee KNOWS the answer.
Then  $K = 1 - (G+C) = 1 - (\frac{1}{6} + \frac{1}{3}) = \frac{1}{2}$
Here also, we will say: the Probability that his answer is correct given that he KNOWS the answer => $P(A|K) = 1 $. 
The probability that he knew the answer, given that his answer is correct  =
$ P( \frac{\text{Man knew the answer to the Question}}{\text{He has correctly answered it}}) = P(\frac{\text{Man knew the answer to the Question}}{\text{Man knew the answer to the Question OR He Guessed the answer OR He Copied the correct answer}} )= P(\frac{\text{Man knew the answer to the Question}}{\text{Man knew the answer to the Question + He Guessed the answer + He Copied the correct answer}} )  => P(K|A) =  \frac{P(K).P(A|K)}{P(K).P(A|K) + P(G).P(A|G) + P(C).P(A|C)} =  \frac{P(K).(1)}{P(K).(1) + P(G).(\frac{1}{options}) + P(C).(\frac{1}{8})} =   \frac{\frac{1}{2}.(1)}{\frac{1}{2}.(1) + \frac{1}{3}.(\frac{1}{4}) + \frac{1}{6}.(\frac{1}{8})} =  \frac{24}{29}$
