I'm sorry to hear that your pup ate something he should not have.
Tampons are super absorbent and tend to expand quite a bit in the juices of the gastrointestinal system. These may pass but since he just ate them, within the past 2-3 hours, it's worth trying to get him to vomit them back up.
You can give him 1 tablespoon of 3% hydrogen peroxide per 10 pounds of body weight mixed with bread chunks or ice cream (no more than 3 tablespoons even if he weighs more than 35 pounds).
Then take him outside and run him around to get the peroxide bubbling so it irritates his stomach lining and he vomits.
If no vomiting in 10 minutes repeat the peroxide dose once.
If he vomits and seems to clear his stomach and be done I would check to see if the pieces are present.
Once he finishes vomiting and empties his stomach to try and settle his stomach today you can give either:
1) Pepcid-ac (famotidine) at a dose of one half of a 10mg tablet per 10 to 20 pounds of body weight every 12 hours.
2) Prilosec (omeprazole) at a dose of one half of a 20mg tablet per 20 to 40 pounds of body weight every 24 hours.
These will reduce stomach acid and should help settle his stomach.
Then feed a homemade diet of 1/3 boiled, lean hamburger or boiled, white, skinless chicken, all fats and juices drained off the meat, and 2/3 boiled, plain, white rice. Add 2 tablespoons of canned pumpkin, (not pie filling, just pumpkin), to each meal for fiber whether he vomits most of the foreign material back up or not to help push the remaining pieces through.
If you don't have peroxide you can get him to an emergency clinic to induce vomiting.
If he doesn't vomit the tampons back up or you choose not to take him to an emergency clinic still use the bland diet with pumpkin to try and get the pieces to pass.
Once it has been several hours since he ate the tampon it is likely too late to induce vomiting, the pieces will likely be out of his stomach. All you can do at that point is watch him closely. If he starts vomiting, has a tense painful belly or refuses to eat or runs a fever (more than 103F rectally) then that can signify a blockage and he should be seen by a veterinarian immediately. Surgery may be needed at that point.
Please let me know if you have any further questions.