My cats have ringworm for over a month

Maddie

I got a new kitten and until i brought her home i went to vet, he said everything is okay...but it was not ....after a while my kitten started to lose hair, went back again and he offered me medication but didn’t work as well as i got infected too and for 2 weeks my older cat got infected too even tho I went back and changed to another medication. Did anyone got ringworm in pets ? If so how do you get it away ? I’m struggling so much