No need to do anything. When you export, the duration of the video will be automatically to the end of the last object (image or video clip) that is on the timeline. Make sure that there are no gaps.
In the above project, the duration of the exported video will be 4 seconds which is the end of the objects.