For this, I took n=2 which makes the set: {1,2,3,4}
Set will contain: {C1,C2,B1,B2}
X = 1 if the position of first cider bottle is 1
P(X=1) = 6/24 = 1/4
E(X) = 2 * 1/4 = 1/2
The general form will be: n*1/2n = 1/n.
This is my attempt, I'm not sure if I'm correct on this.
For this question:
You roll a fair die repeatedly and independently until the result is an even number. Define the random variables X = the number of times you roll the die and Y = the result of the last roll. For example, if the results of the rolls are 5; 1; 3; 3; 5; 2, then X = 6 and Y = 2. Prove that the random variables X and Y are independent.
I defined X = 1 if number of times roll die is 1 time
and Y =1 if result of last roll is even
So, Pr(X) = 3/6 = 1/2 = Pr(Y)
Pr(X and Y) = 1/2
This gives me 1/2 = 1/4 which is not independent but the question is asking to prove independence

$\{X=1\}$ is the event that the first bottle is a cider bottle.
Probability on that: $P(\text{first cider})=\frac{n}{n+2}$
$\{X=2\}$ is the event that the first bottle contains beer and the second bottle contains cider.
Probability on that: $P(\text{first beer})P(\text{second cider}\mid\text{ first beer})=\frac2{n+2}\frac{n}{n+1}$.
$\{X=3\}$ is the event that the first bottle contains beer and the second bottle contains beer.
Probability on that: $P(\text{first beer})P(\text{second beer}\mid\text{ first beer})=\frac2{n+2}\frac{1}{n+1}$.
Now we are ready to find:$$\mathbb EX=P(X=1)+2P(X=2)+3P(X=3)=\frac{n}{n+2}+2\frac2{n+2}\frac{n}{n+1}+3\frac2{n+2}\frac1{n+1}=\frac{n+3}{n+1}$$
There are $2$ bottles that have index $1$ so that $P(Y=1)=\frac2{n+2}$.
$\{X=1,Y=1\}$ is the event that the first bottle is the cider bottle with index $1$.
Probability on that: $P(X=1,Y=1)=\frac1{n+2}$.
So a necessary condition for independence is: $$\frac{n}{n+2}\frac2{n+2}=P(X=1)P(Y=1)=P(X=1,Y=1)=\frac1{n+2}$$
leading to $n=2$.
So we conclude that there is no independence if $n>3$ and there might be independence if $n=2$. To verify we must check for that case whether $P(X=i)(Y=j)=P(X=i,Y=j)$ for $i,j\in\{1,2\}$.
I leave that to you.