2* 12x= 18(28-x)
[Note that the left side here should be ×2 because one bolt has two nuts, so twice the number of bolts is equal to the number of nuts]
24x=504- 18x
42x=504
x= 12
So allocate 12 people to make bolts and 16 people to make nuts.