Transmitted at birth
It is most likely the 4m cousin acquired the germ from her mother during direct contact during labor
The germ transfers to baby & sets up in the system, gaining access to the blood & then moving to the brain. It is unlikely that your child could get the illness in any form during a simple visit to the other child's home. It is not passed in the air.