买两种布料共138米,花了540元.其中蓝布料每米3元,黑布料每米5元,两种布料各买了多少米?