George wants to put carpeting in a rectangular living room and a square bedroom. The length and width of the living room is 12 feet by 18 feet. One side of the square bedroom is 13 feet. It will cost $3.50 per square foot to carpet the rooms. How much will George pay for the carpeting?