Buy a GOOD BOOK tomorrow.
Guinea pigs need a secure warm home, regular handling, fresh water and PLENTY of fresh fruit and vegetables to be a good pet. They cannot store vitamin C so you MUST provide them with a RANGE of fresh fruit and vegetables.
They will also mow your lawn for you - invest in a good, SECURE outdoor run with an indoor shelter for them (a wooden cube less two sides works well). Invest also in a good outdoor rug with waterproof backing to shelter them from wind/rain in cooler weather and the sun in warmer weather. Do NOT put them outside if it's less than 45 degrees.
They need regular handling, especially in the first few months - 2-3 times a day for short periods of time. They will enjoy being hand-fed. Try a range of foods to find out their favourites. You can use this to teach them tricks
DON'T use sawdust for their bedding - it gets in their eyes. Straw poses the same problem but significantly more rarely. They need a base of newspaper and plenty of warm straw or hay (they will eat the hay so you will need to replenish it daily). They need a full clean at least once a week (take EVERYTHING out the cage and clean it) and a small change every 2-3 days. Plenty of fresh water is essential, obviously.
You should also regularly check their eyes, ears, nails and teeth. Nails will get overgrown if they are not worn down (ten minutes on wood or concrete every day will solve this).
They are hardy animals and can live outside in temperatures up to 30 degrees providing they are in a covered hutch (use the rug you use for their outdoor run). There is no need to keep them indoors otherwise (they will need cleaning DAILY if they are indoors as these animals poop A LOT). In the summer you need to place them in a well-shaded area.
They also MUST live in groups of at least two. You should check their gender VERY carefully! Two girls is best, but two boys will not fight providing they have been together from a very young age.
If your ex bought your daughter only one guinea pig, you must go purchase another of the same age/gender - guinea pigs are VERY social creatures and it is considered cruel by all animal welfare agencies to keep just one (unless it has been raised individually and rejects all other guinea pigs).