Number of soap bars that can be packed in 1 carton = 85
Number of soap bars that can be packed in 2 cartons = 2 × 85
= 170
Number of soap bars that can be packed in 3 cartons = 3 × 85
= 255
Number of soap bars that can be packed in 4 cartons = 4 × 85
= 340
If we take 3 cartons, then we can pack only 255 soap bars.
Thus, Shally will need 4 cartons to pack 338 soap bars.