Green stools and throwing up green vomit, what's the problem?

Bile. A viral infection or food poisoning may be the cause. Green stool is usually caused by rapid transit time in the gut, which can happen when an infection makes the gut mucosa more permeable to water or prevents absorption of your intake. Bile refluxing from the duodenum is enough to make vomit green. Hope you're feeling better -- if this is clearly not a mild self-limited illness, get seen.