It is unlikely they would die from sharing food, but it is not a good idea.
Mice and guinea pigs have different nutritional needs. Sharing food can spread bacteria or parasites, and one animal may bully the other away from food.
Feed each animal its own appropriate diet. Consult a veterinarian if you are concerned about their health.