A man bought a horse and carriage for $500 paying three times as much for the carriage as for the horse how much did each cost