lösen
to solve
To find the answer to a problem, a puzzle, or a task.
Die Schüler konnten die schwierige Matheaufgabe nicht lösen.
The students couldn't solve the difficult math problem.

to solve / loosen
Loading your saved state.
to solve
To find the answer to a problem, a puzzle, or a task.
Die Schüler konnten die schwierige Matheaufgabe nicht lösen.
The students couldn't solve the difficult math problem.

Many meanings of 'lösen' (to solve / loosen) can be derived from the idea of 'los machen' (to loosen / set free) or 'frei machen' (to free). You make a problem 'loose' (solve it), a knot 'loose' (untie it), or a substance 'loose' from its solid form (dissolve it in water).
Er versucht, die festgerostete Schraube zu lösen.
He is trying to loosen the screw that has rusted tight.
Since 'lösen' has many meanings, the object of the verb is the most important clue. The word that comes after 'lösen' almost always tells you the exact meaning: a puzzle, a knot, a ticket, or a contract.
Sherlock Holmes konnte jedes Rätsel lösen.
Sherlock Holmes could solve every puzzle.
In the meaning 'eine Antwort finden' (to find an answer), 'lösen' is typically combined with abstract challenges. Common collocations are 'ein Problem lösen' (to solve a problem), 'einen Konflikt lösen' (to resolve a conflict), or 'eine Gleichung lösen' (to solve an equation).
Die Politiker versuchen, den politischen Konflikt zu lösen.
The politicians are trying to resolve the political conflict.
The phrase 'eine Fahrkarte lösen' (to buy a ticket) is correct, but sounds somewhat formal or technical. In everyday language, many people simply say 'eine Fahrkarte kaufen' (to buy a ticket).
Bitte lösen Sie Ihr Ticket vor Fahrtantritt am Automaten.
Please purchase your ticket from the machine before starting your journey.
When it comes to formal agreements, 'lösen' means something like 'beenden' (to end) or 'auflösen' (to dissolve / terminate). This is often used in a legal or business context.
Die Firma hat den Vertrag mit dem Lieferanten gelöst.
The company terminated the contract with the supplier.
In the reflexive form 'sich lösen' (to come loose / detach), the preposition 'von' (from) with the dative is often used. It describes something separating from a surface or a person.
Das Etikett hat sich von der Flasche gelöst.
The label came loose from the bottle.
to buy
'kaufen' and 'lösen' can both mean that you pay for something and then receive it. 'kaufen' is the general word for things you get in exchange for money, for example food, clothing, or a book. 'lösen' is used in this meaning only for certain kinds of tickets, especially travel tickets or admission tickets. Learners may confuse the words because you can both 'kaufen' and 'lösen' a ticket. 'kaufen' sounds more general and often simpler in everyday life; 'lösen' sounds somewhat more formal or typical for tickets.

Vor der Fahrt löst Frau Schneider am Automaten eine Fahrkarte.
Before the trip, Ms. Schneider buys a ticket from the machine.
Nach der Arbeit kauft Ali noch Brot und Milch.
After work, Ali buys some bread and milk.