A baker sold cupcakes at $3 each and pies at $2 each. Kaili bought some cupcakes and Wei Ming bought some pies from the baker. Wei Ming spent $ less than Kaili. The number of pies Wei Ming bought was 5 more than the number of cupcakes Kaili bought. How much did Wei Ming spend on the pie?