The answer is 24 as it's the smallest number given that is divisible by both 6 and 8.
120/4 is 30
You'll be able to put 4 nails thirty times.
You put them every 6 feet
So, you have 5 feet before running out.
7/8=x/48
x=(7/8)48
x=(7)(48/8)
x=(7)(6)
x=42
D.42