Let the number of white shirts be w, the number of yellow shirts be y:
1) w + y = 30 or w = 30 - y
2) 9.95w + 10.50y = 310.60
substitute eq(1) into eq(2):
9.95(30 - y) + 10.50y = 310.60
298.5 - 9.95y + 10.50y = 310.60
combine like terms:
0.55y + 298.5 = 310.6
subtract 298.5 from both sides:
0.55y = 12.1
divide both sides by 0.55:
y = 12.1/0.55 = 22 yellow shirts
using eq(1):
w = 30 - 22 = 8 white shirts
check using eq(2):
9.95(8) + 10.50(22) = 310.60
79.6 + 231 = 310.60
310.6 = 310.6
There were 8 white and 22 yellow shirts sold.