Please, help me understand the difference between the following sentences:
1. I would like to have a car / I wish I had a car.
In the sentence: "Is it less dangerous to live in the countryside or in the city"? Instead of "to", could I have used "living"? Why (not)?
I would like to have a car. - that's just a plain statement that you would like to have a car.
I wish I had a car. - there is more than just a statement here. You in fact express some longing or a deep heartfelt desire to have a car.
As for your second question, here is what you can do with the word "living" and still preserve the same meaning:
Is it less dangerous living in the countryside or living in the city.
Is it less dangerous living in the countryside than in the city?