You can do it as one scene but for things like this, if it gets interrupted by a reboot, a switch being manually toggled, or you save something new, then the second part (the off generally) will fail to trigger. Best to make two separate scenes:
Create the first scene and once you have set your the action in the commands tab (set to turn on the selected device), you can then set a timer in the timer tab to turn it on at sunset by clicking “add timer” then select the “day of the week” then all the applicable days, then select “at sunset” then save.
Create a second scene in the same way but this time with the same device being turned off! Add a Timer but select “after sunset” and the amount of hours (in this case 5) from the box next to it.