Zachary and his children went into a bakery and he bought $15 worth of cupcakes and brownies. Each cupcake costs $3 and each brownie costs $1.50. He bought 3 times as many brownies as cupcakes. Determine the number of cupcakes and the number of brownies that Zachary bought.