3 bags of chips and 5 bottles of water cost $31. A chip costs one dollar less than 3 bottles of water. Find the cost of each.

3 c + 5 b = 31

c = 3 b - 1
======================

3 (3b-1) + 5 b = 31

9 b - 3 + 5 b = 31

14 b = 34