I assume you are in UK because of reference to Freeview.
(Basically, you do it the same as if connecting a VCR to freewiew and a TV)
I am not familiar with the 5002, but assuming similar to 5001 do it as follows:
For the RF (ariel lead)connections, you connect ariel first to set-top box, and then connect from set-top to the DVD ariel input, and then from the DVD ariel output to the TV. You will need a separate flylead. You would need to use tune the DVD to pick up the set-top box (assuming the set-top box has an RF modulator built in (not all do - some just pass the normal analogue channel signals through).
However, it is better to use the scart connections as yoiu get better quality recordings.
Virtually all set-top boxes have at least one SCART socket. Connect set top box SCART out (probably connected to TV) to SCART input on DVD (sometimes labelled AV1). The connect SCART out (sometimes labelled AV2) socket to TV. You will need two scart leads.
To see the freeview contents on the TV, set the DVD recorder to scart input mode, and similarly set the TV to appropriate scart socket (if more than one scart socket on TV).
You will be able to record freeview and watch freeview whilst recording the same digital channel. You can't watch freeview whilst recording an analogue station unless you have more than one scart socket freeview box and on TV (connect spare socket direct to TV in this case).
(even if you don't have two scart sockets on freeview box, you may still be able to see freeview whilst recording analogue channel on DVD by tuning TV tuner to freeview if it has RF out.)
You will not be able to watch one freeview channel whilst recording another as this needs two freeview tuners.
Hope this helps