Let b and g represent the number of girls and boys; s be the number of candies Sam takes, and h be the number Hilda takes. We know:
(1) s * (b + g) = 70 (2) h * g = 70 - s (3) 8 * (b + g - 2) = 70 - s - h (3'

8 * (b + g) = 86 - s - h
From (1) and (3'

:
(4) 70 / s = (86 - s - h) / 8
Now, s has to be one of {35, 14, 10, 7, 5, 2, 1}, since Sam took a factor of 70, and we know (b + g) is at least 1. If we plug those in to (4) and solve for h:
2 = (51 - h) / 8