There are different correct answers to this questions. Deworming depends on the number, sex, breeding status and function of the animals and the climate (wet/dry/hot/cold). Even then, it is not an exact science and different answers can be valid. In general, baby goats are first dewormed at around a month of age, again at 2 months of age and regularly thereafter as determined by fecal analysis. With only two goats, getting wormer from your vet or a friend who also has goats would make sense.
The barber pole worm (Haemonchus contortus) is a roundworm and the most important worm of goats. Adult worms in the intestines produce eggs that exit in manure. Larva hatch from the eggs and go through several stages before they become infective to goats. Warm temperatures, moist condition and grass pastures are required for the larva to thrive. They die in cold, dry climate and on dirt without grass.
Haemonchus causes anemia.The name of barber pole derives from the red and white striped appearance. The red is blood. Check your goats for pale membranes best seen in the membranes around the eyes. They should be pink. If they are white, the goat is likely to have worms. You should have your vet do a fecal analysis for worm eggs several times a year to check your control program.
Young goats are the most susceptible and are generally wormed at one month of age, which is a week or two after they start to browse and get exposed to larva. The worms take about 3 weeks to mature so retreating in a month makes sense. Ivermectin is a good choice because worms generally do not acquire resistance to it. It is not approved for use in goats because of the expense of getting approval for minor species. However, it has been widely used since the drug was developed in the early 1980s. It is considered safe and effective. It is dosed at 1.5 - 2 times the sheep dose (0.2 mg/kg) or 0.4 mg/kg. Moxidectin, another avermectin, is also used commonly.
Coccidia is another important intestinal parasite of goats. Some coccidia live in the intestinal tract of goats without causing problems. They are normally kept in check by adult immune system. Large numbers are the problem and they cause diarrhea, weight loss and lack of appetite. Baby goats usually get infected within days of birth and are treated at about a month of age. Coccidia can multiply and cause problems in stressful situations. Good sanitation, feeding off the ground and dry quarters help minimize exposure. Trimethoprim sulfa and amprolium are reasonable treatments for symptomatic coccidiosis. There is no reason to treat adult animals unless they are symptomatic.
Meningeal worm or brain worm are another potential problem. This parasite is carried by white tail deer, passes out in manure and is picked up by snails/slugs. Goats are infected by eating the snails The worms migrate through the body and into the spinal cord and brain. Signs range from none to paralysis. Diagnosis is usually based on clinical signs and ivermectin is used for treatment.
Lung worm and liver flukes are other goat parasites that are generally less common, but can occur in some geographic areas.
In addition to deworming regularly according to fecal analysis, make sure the young goats are vaccinated against tetanus and Clostridium (overeating disease). Rabies vaccination is commonly used in areas with rabies although the vaccine is not licensed in goats, again because licensing is too costly for a minor species.
Let me know if you have follow up questions.