Initially, let V
be the volume of a beaker occupied by sand, and let B refer to blue sand and R to red sand. The situation is like this:
┌───────────────┬────────────────┬───────────────┐
│ Beaker 1 │ Outside │ Beaker 2 │
┌─────────────────┼───────────────┼────────────────┼───────────────┤
│ Occupied volume │ V │ 0 │ V │
│ Mass blue sand │ Mb │ 0 │ 0 │
│ Mass red sand │ 0 │ 0 │ Mr │
└─────────────────┴───────────────┴────────────────┴───────────────┘
Taking 1 cup of volume Vc from beaker 1
┌───────────────┬────────────────┬───────────────┐
│ Beaker 1 │ Outside │ Beaker 2 │
┌─────────────────┼───────────────┼────────────────┼───────────────┤
│ Occupied volume │ V-Vc │ Vc │ V │
│ Mass blue sand │ Mb(V-Vc)/V │ Mb*Vc/V │ 0 │
│ Mass red sand │ 0 │ 0 │ Mr │
└─────────────────┴───────────────┴────────────────┴───────────────┘
Pouring the cup to beaker 2 and mixing, assuming additive volumes,
┌───────────────┬────────────────┬───────────────┐
│ Beaker 1 │ Outside │ Beaker 2 │
┌─────────────────┼───────────────┼────────────────┼───────────────┤
│ Occupied volume │ V-Vc │ 0 │ V+Vc │
│ Mass blue sand │ Mb(V-Vc)/V │ 0 │ Mb*Vc/V │
│ Mass red sand │ 0 │ 0 │ Mr │
└─────────────────┴───────────────┴────────────────┴───────────────┘
Taking 1 cup of volume Vc
from beaker 2
┌───────────────┬────────────────┬───────────────┐
│ Beaker 1 │ Outside │ Beaker 2 │
┌─────────────────┼───────────────┼────────────────┼───────────────┤
│ Occupied volume │ V-Vc │ Vc │ V │
│ Mass blue sand │ Mb(V-Vc)/V │ Mb*Vc²/V(V+Vc) │ Mb*Vc/(V+Vc) │
│ Mass red sand │ 0 │ Mr*Vc/(V+Vc) │ Mr*V/(V+Vc) │
└─────────────────┴───────────────┴────────────────┴───────────────┘
Pouring the cup to beaker 1 and mixing, again with additive volumes,
┌───────────────┬────────────────┬───────────────┐
│ Beaker 1 │ Outside │ Beaker 2 │
┌─────────────────┼───────────────┼────────────────┼───────────────┤
│ Occupied volume │ V │ 0 │ V │
│ Mass blue sand │ Mb*V/(V+Vc) │ 0 │ Mb*Vc/(V+Vc) │
│ Mass red sand │ Mr*Vc/(V+Vc) │ 0 │ Mr*V/(V+Vc) │
└─────────────────┴───────────────┴────────────────┴───────────────┘
This time the math was a bit more difficult to do mentally. This is the mass of blue sand in beaker 1:
$M_b \frac{V-V_c}{V} + M_b \frac{V_c^2}{V(V+V_c)}
= M_b \frac{V^2-V_c^2}{V(V+V_c)} + M_b \frac{V_c^2}{V(V+V_c)}
= M_b \frac{V^2}{V(V+V_c)}
= M_b \frac{V}{V+V_c}
$
Therefore, the answer is
Beaker 1 ends up having $M_r \frac{V_c}{V+V_c}$ mass of red sand.
Beaker 2 ends up having $M_b \frac{V_c}{V+V_c}$ mass of blue sand.
So it depends.
If blue sand is more dense than red sand, i.e. $M_b > M_r$,
Then beaker 1 has less mass of red sand than beaker 2 has of blue sand.
If blue sand is as dense as red sand, i.e. $M_b = M_r$,
Then beaker 1 has the same mass of red sand than beaker 2 has of blue sand.
If blue sand is less dense than red sand, i.e. $M_b < M_r$,
Then beaker 1 has more mass of red sand than beaker 2 has of blue sand.
Other answer say the amount of sand is the same because they suppose the densities are the same, or because they compare volumes instead of masses.