Your 5yrs old son will have to be examined firstly to rule out any injury
or boil in the penis.
If it has been ruled out then there is a possibility that the ear infection
was due to Streptococcus
and he could be suffering from Post streptococcal glomerulronephritis now if the urine on keeping still in air after sometime changes to coffee ground colour.
If there is pus also in the urine sample then it is likely to be urinary infection which will have no correlation with the ear infection.
However at present since the full urine report is not available it would be difficult to comment.