sodas = y
hotdogs = x
x + y =123
"The number of sodas sold was two times the number of hot dogs sold" ; From this we can generate a new equation:
y = 2x
We now have two equations and two unknowns so we can solve for x and y. We can plug in this new equation into the other one and get:
x + y =123
y = 2x
x+ (2x) =123 ..... 3x=123 .... x=41
2(41)=y .... y=82
82 sodas and 41 hotdogs were sold.