5 to 32-line decoder with four 3 to 8 decoders
We have 5 input lines and you need output lines
now let lines are
We connect d3 and d4 to 2-to-4 line decoder
connect d0, d1, and d2 to all 3-to-8 line decoders.
Now we connect output of 2-to-4 line decoder to enable pins of 3-to-8 line decoders such that the first output makes first 3-to-8 line decoders enable.
thats it 32 output of 3-to-8 line decoders are we are required output
We can illustrate this as captured below: