Your sentence "Yes mum l gave it to him before lessons began replied James." contains some punctuation and capitalization errors. Here's the corrected version:
"Yes, Mum, I gave it to him before lessons began," replied James.
Changes made:
1. Capitalized "Mum" as it's a proper noun.
2. Added a comma after "Yes" to separate it from the rest of the sentence.
3. Capitalized "I" since it's the pronoun.
4. Added a comma after "Mum" to set off the introductory phrase.
5. Added a comma after "began" to indicate the end of the introductory clause and separate it from the main clause.
6. Enclosed "replied James" in quotation marks to indicate it's a dialogue tag.
These changes make the sentence clearer and more grammatically correct.