Prepositions often come at the ends of clauses in English. This happens in several kinds of structure:
a) questions beginning what, who, where etc.
- What are you looking at?
- Who did you go with?
- Where did you buy it from?
b) relative clauses
- There's the house (that) I told you about.
- You remember the boy I was going out with?
с) passive structures
- I hate being laughed at.
- They took him to hospital yesterday and he's already been operated on.
d) infinitive structures
- It's a boring place to live in.
- I need something to write with
In a more formal style, we can put a preposition before a question-word or a relative pronoun.
- To whom is that letter addressed?
- She met a man with whom she had been friendly years before.
- On which flight is the general travelling?