I ran a Monte Carlo simulation and the answer was 1/3. What the fuck. This really is a rewording of the Monty Hall problem. I actually thought this was a different situation, where the answer would be 1/2. Here's the code I wrote:
import random
runs = 10**6
not_silver_first_cnt = 0
next_ball_gold_cnt = 0
next_ball_silver_cnt = 0
box_both_gold = 1
box_mixed = 2
box_both_silver = 3
ball_gold = 1
ball_silver = 2
for i in range(runs):
box1 = random.randint(1, 3)
if box1 == box_both_silver:
not_silver_first_cnt += 1
continue
if box1 == box_both_gold:
next_ball_gold_cnt += 1
continue
ball1 = random.randint(1, 2)
if ball1 == ball_silver:
not_silver_first_cnt += 1
else:
next_ball_silver_cnt += 1
valid_runs = runs - not_silver_first_cnt
silver_chance = next_ball_silver_cnt / valid_runs
print(f"{next_ball_silver_cnt}/{valid_runs} = {silver_chance}")