The relationship of bacteria and the cow is not parasitism. In parasitism, the parasites benefit at the expense of the other which is the host. Therefore the parasites will thrive while the host will suffer (utmost they die); this is not the case for the bacteria and the cows.
Commensalism is a relationship where one organism benefits while the other is neither benefited nor harmed. This is also not a case for the cows and the bacteria. Both of them benefit from existence of each other which lead us to the third option:
Mutualism is a term that both of the organism benefit from each other. The bacteria living in the cow's stomach is benefited since they have a good supply of food, nutrients and place to thrive. On the other hand, the cow is benefited since the bacteria produce cellulase, a compound that helps in the digestion.
The relationship is mutualism because both the bacteria and the cow benefit. The bacteria breaks down the food the cow can't digest and turns it into energy for the cow and at the same time the bacteria gains something to eat.