The front teeth are fine.
OK - that means that the back teeth are most likely not overgrown.
In this case, I would try the worming medication. Can you please give us the name and - if you have it - the active ingredient?
Can you please try to step in with syringe feeding to make sure that your guinea pig is getting enough food, especially the fibre it needs to rebalance the guts. You can use softenened pellets, which you soak in warm water, as shown in the syringe feeding guide in my first post. The fibre will pass through the syringe you have been given for the wormer if cut you off the tip as shown. Your care in this respect can make the difference between life and death.
Please weigh daily at the same time in the feeding cycle so you get a comparable weight; the daily weight band is about 30-40g in which the weight swings between a full and empty bladder and guts. Your first aim is to stabilise the weight and the digestive system. Normal kitchen scales are just fine!
Please read our step-by-step syringe feeding guide (link in my first post), which we have specifically written for member with no previous experience. There is also a link to an illustrated guide on how to medicate and syringe feed your guinea pig (for both cooperative and not cooperative piggies) attached to the guide.
If possible, take off any fresh food; this can cause fermentation if your piggy is not getting enough fibre. The more fibre the better; especially right now. If you can get hold of probiotic powder, that would be great; add a pinch to the syringe feed. Very ill piggies with an unbalanced gut also love very rough, low grade fibre, so a bit of brown cardboard to nibble on is just what they crave.
Is your guinea a single or does it have a companion? If you have a healthy companion, you can take it out for feeding veg and pick up any healthy poos it has made while eating. Soak them in a little water and then syringe the water straight away to your ill piggy. We call this 'poo soup'; if made extremely fresh, it is more effective in reintrocing healthy live gut microbes into your ill piggy's guts than any probiotic powder. This also mimics natural behaviour - and it can really make a difference in rebalancing the digestion, especially after the radical worming.
Make sure that you also offer as much water as your piggy will drink off the syringe to make sure that it is hydrated. You can help rehydration by adding electrolytic powder for human drinks from a pharmacy to the water (how to is on the packaging).