Thank you for your query.
This disease is contagious not genetic or hereditary.
Treat both the children for the infection. This may take up to 12 weeks of treatment to heal. You have to treat all the affected members.
Consult a good dermatologist
to treat this condition called onychomycosis
This has no relation to ingested food.
I understand your concern.
If you have any further queries you are free to consult me.
Hope this answers your query.
Wishing a speedy recovery.
Do not worry we are there to help you out.
Have a nice day.