Let the number of nails in a small box = N
Then the number in a large box = N + 20
And we know that
The number in two large boxes = (1/2) the number in six small boxes....so....
2 * (N + 20) = (1/2) (6N) simplify
2N + 40 = 3N
40 = 3N - 2N
40 = N = the number of nails ina small box
40 + 20 = 60 = the number of nails in alarge box
