carpet cost $2 per square foot. linoleum costs $1 per square foot. with $500, and 300 square feet to cover, how much carpet and linoleum can be bought?