Let t=time, p=people, and w=walls.
We know that the time it takes is directly proportional to the length of the wall but inversely proportional to the number of people working. That is

We solve for the constant of proportionality, k.

The initial values for k are the same for the final values. That is

It will take
16 minutes.