Hello,
Welcome to HCM.
You seem to be suffering from incompletely treated
fungal infection of foot skin most probably
tinea cruris.
You can start below treatment.
You should apply plain anti fungal cream like
clotrimazole for at least 2 weeks twice daily application over your affected part.
An anti-fungal oral medicine (terbinafine,
griseofulvin, or FLUCANAZOLE) tablets can also be taken prescribed by the doctor but if the infection is widespread or severe.
But before that it will require clinical inspection of the local area for which you should see nearby dermatologist.
To prevent recurrence of fungal infection.
Wash your foot and groin daily; then dry thoroughly since groin is also predisposed site to grow for tinea.
Drying is perhaps the most important point.
Change underwear daily. Fungi may multiply in flakes of skin in unwashed underwear.
Wear cotton undergarments only.
Keep your separate towel.
Consult dermatologist for further advise.
Regards.