The first video below on composition for Grade 5 is by Music Matters Grade 5 Theory on Composing a Melody. It is presented by ABRSM Examiner Gareth Green. He has presented the topic on Composing in a clear and easy to understand manner.
The second video below is on How To Pass Grade 5 Theory on Composition. It is presented by Alison M. Sparrow who has a channel on YouTube called The Online Piano And Violin Tutor. She has included a free printable composition checklist in pdf format. Do watch out for the link in the video. It is very useful as a basic checklist for students attempting composition or writing a melody questions for the first time.
Finally, from my favorite site for learning Music theory, MyMusicTheory.com, do read up this lesson on Composing a Melody General Tips and Composing a Melody for Instruments.
You should get a very good idea on how to attempt the composition question for ABRSM's Grade 5 Theory On Composition with these references. Good luck to you and to us too.