We first calculate how much weight comes from the large boxes by multiplying their number (which we'll call L) by the weight per box: 25 * L = total weight contributed by large boxes
We then do the same for the smaller boxes (of which there will be S): 50 * S = Total weight contributed by small boxes
Since these are equal to each other, we can write them as an equation: 25L=50S or 25/50=S/L
Dividing both sides by 50 gives us S/(50)=(25/50)L or 1/4L=1/2S
Multiplying both sides by 4 solves for L, giving us L=16; so the truck has 16 large boxes. Similarly, dividing each side of this equation by 4 yields s=4; so the truck also carries 4 small boxes.