According to the meaning of the question, you can calculate:
Fruit candy can be packaged: 30÷5=6.
Chocolate can be packaged: 30÷6=5
So you can pack up to 5 boxes.
Extended data:
When the sum of several numbers is divided by a number, you can divide each addend by this number first, and then add each quotient. For example: (24+32+16) ÷ 4 = 24 ÷ 4+32 ÷ 4+16 ÷ 4 =18.
The difference between two numbers is divided by a number, and the quotient obtained by dividing the minuend by this number can be subtracted from the quotient obtained by dividing the minuend by this number. Example: (65-39) ÷13 = 65 ÷13-39 ÷13 = 2.