Probability-There is a box. Inside we put in two balls, which can be red or blue with equal probability. There is a box. Inside we put two balls, which can be red or blue with equal probability. We take out one ball and see that it is red. We put it back. We take out another ball and see that it is red again.
What is the probability that the other ball is red?
What is the probability that both balls are red if this experiment is repeated 3 times and each time the ball we take out is red?
What is the probability that both balls are red if this experiment s repeated n times and each time the ball we take out is red?
My attempt:
For the first question, I did $$1/2 \cdot 1 (\text{if two balls are red})+ 1/2 \cdot 1/2 (\text{if the other ball is blue})=3/4,$$ but I guess it is wrong because teacher gave me zero points.
 A: Let $T_0$ be the event that the total number of reds in the box is zero.  Similarly, let $T_1$ be the event that the total number of reds in the box is one, and also define $T_2$ in the same way.
It should be clear that $\Pr(T_0)=\frac{1}{4},~\Pr(T_1)=\frac{1}{2}$ and $\Pr(T_2)=\frac{1}{4}$.
Let $X_2$ be the event that if we take out two balls with replacement, both times they are red.  Similarly, define $X_n$ to be the event that if we take out $n$ balls with replacement, all $n$ times the balls are red.
It is trivial to see that $\Pr(X_n\mid T_0)=0,\Pr(X_n\mid T_1)=\frac{1}{2^n}$ and $\Pr(X_n\mid T_2)=1$

Your question, reworded, is asking for $\Pr(T_2\mid X_2)$ as well as $\Pr(T_2\mid X_n)$ in general.
For this, use Bayes' Theorem.  $\Pr(A\mid B) = \frac{\Pr(B\mid A)\Pr(A)}{\Pr(B)}$ and total probability $\Pr(C)=\Pr(C\mid D)\Pr(D)+\Pr(C\mid D^c)\Pr(D^c)$.
We have:
$$\Pr(T_2\mid X_2) = \dfrac{\Pr(X_2\mid T_2)\Pr(T_2)}{\Pr(X_2)}$$
$$=\dfrac{1\cdot \frac{1}{4}}{\Pr(X_2\mid T_0)\Pr(T_0)+\Pr(X_2\mid T_1)\Pr(T_1)+\Pr(X_2\mid T_2)\Pr(T_2)}$$
$$=\dfrac{1\cdot \frac{1}{4}}{0+\frac{1}{4}\cdot\frac{1}{2}+1\cdot\frac{1}{4}} = \dfrac{2}{3}$$
You can similarly find $\Pr(T_2\mid X_n)$
