Any medication will come with instructions from your vet.
You will need to syringe the required amount into his mouth.
Antibiotics don’t usually taste very nice so it is a good idea to follow it up with a tasty treat such as coriander or piece of pepper - whatever your piggy likes - to take the taste away.
Ensure you switch to daily weight checks during any period of illness so that you can monitor hay intake and so you can step in with syringe feeding. A piggy with a respiratory infection will often/usually reduce the amount of hay they eat independently so will require support feeding of a recovery feed to keep weight stable.
The guide below explains more about syringe feeding and also how to give medication.
I hope he is ok
All About Syringe Feeding and Medicating Guinea Pigs with Videos and Pictures