Consider this option:
1. according to the first condition 45 min for 4 p. 5 walls, it means that: n*a*t=w, where n-numbers of people, a- ability of one person and w-numbers of walls.
4a*45=5, a=1/36 - ability for one person.
2. according the second condition for 6 people and 4 walls:
6*1/36*t=4, ⇒ t=24 minutes.
answer: 24 min.
If it is possible check the arithmetic part.