Joel bought 3 cupcakes and 1 loaf of bread from the bakery for $5.60. Irfan bought 2 cupcakes and 2 loaves of bread from the same bakery for $6.40. How much did each cupcake cost?