how long would it take to travel to mars
This, by the way, is called a Hoeman Transfer Orbit, and is the main stay of interplanetary space travel. It depends on the details of the orbit you take between the Earth and Mars. The typical time during Mars's closest approach to the Earth every 1.6 years is about 260 days.