Let n be the number of Granola bars purchased with the $5 bill:
C(n) = 0.5n, where C = cost of n Granola bars.
With a $5 bill, one can purchase:
C(n) = 0.5n
5 = 0.5n
Divide both sides by 0.5:
So the linear function is function C(n) = 0.5n and a $5 bill can purchase 10 Granola bars.