The redness/cracking/sores people get at the corners of their mouths is called angular chelitis that can, if bacteria or viruses or funguses get into the cracked skin, turn into a staph infection. Many times, it is an indication of nutritional deficiencies or that you have an allergy or a sensitivity to food, a drink, maybe a scent (from washing clothes).
When I got angular chelitis at the corners of my mouth, it took me a few months to realize that I had grown sensitive to green tea. I had to quit drinking it for months. I can now drink it every once in a while without getting angular chelitis.
My daughter has an issue with getting angular chelitis in the winter time. In fact, she has it right now. I am assuming it is a nutritional deficiency with her, because taking either zinc or folate acid usually makes it go away.
Some people have a bad case of Riboflavin/B2 deficiency, especially in the winter. Putting her on a good quality Vitamin B Complex should help clear it up.
The most common type of bacteria that causes angular cheilitis is staphylococci. When it is caused by a fungus, the usually culprit is candidiasis.
I would look into giving her additional supplements if the medicine the doctor gave you isn't helping to clear up the infection. Helping her body heal from the inside out is probably what is needed at this point.
A 100% whole food supplement like MegaFoods Balanced B Complex would be a good choice, although I'm not sure how well a 3-year-old child would be able to swallow the pills.