Thank you for your query on Healthcare Magic.
You are having two issues with your child.
Coming to first issue your child got injured just above the ear leading to swelling and inability to open his mouth wide.
So there may be injury to his temperomandibular joint as child is having difficulty in opening mouth or pain may restricting the opening.
You can give a painkiller like ibuprofen
in prescribed dose for fever
And child require physical examination by the doctor to look for any joint dislocation and any bone injury
Coming to the second issue your child is suffering from a middle ear infection
which is resulted from bacterial infection.
It requires antibiotics to control the infection and to get relief from the fever.
Protect his ear from water entering into it while taking bath and keep the ear clean and dry.
And consult the doctor for examination for both issues and for appropriate management.
Hope I have answered your query.