There's a solution for that: As a feces-ridden cell is a hazard to health Prisoner B can always opt for the self defense route. More so as Prisoner's A "accumulation of the toilet" is immoral, as you suggest.
So let's assume for one moment that the premise was sound and not riddled with holes like swiss cheese:
If prisoner B can't (or doesn't want to) afford to pay the 2 cigarette fee for using the toilet he's forced to defecate somewhere in their cell.
This of course will lead to heavy odor pollution of the cell and prisoner A suddenly has an incentive to let prisoner B use the toilet for free unless he enjoys spending his day in a smelly cell and risk diseases.
Problem solved by the underlying principles of the free market.