Let a be an apple, b be a baseball, p be a pineapple and s be a shoe.
Then, from the balance, we model these equations:
p + b = s ----- (1)
2s = 4a
Divide both sides by 2.
s = 2a
Substitute in (1), we get,
p + b = 2a ----- (2)
Also,
p = a + b ----- (3)
Substitute the above in (2), we get,
(a + b) + b = 2a
a + 2b = 2a
Subtract a from both sides.
a = 2b
Substitute in (3), we get,
p = 2b + b = 3b
Hence, 3 baseballs equal one pineapple.