Here is the problem, without an in person vet exam you cannot be sure just what is wrong with your dog's eye or eyes.
This could be due to a corneal abrasion, a bacterial infection, an eye pressure issue.
You can read about eye issues here
Typically trimethoprim isn't used in dog opthalmic preparations though the drug is sometimes used in dogs and you can read about the common opthamilc preparations here
But before using any treatment (and if this is a used human preparation you may not want to for fear of contamination with another bacteria from the bottle touching the person's eye) you should have a vet exam done to find out what is wrong with the eyes.
Hope this helps you!