Especially (but not only) with technical problems, people often ask questions in a way that assumes a certain solution.
Where can I get a cheap taxi to the airport?
But the person really just wants to get to the airport cheaply, and the best answer might be “Take the train.” However, the question already assumes that a taxi is the right solution.
What is the best glue to assemble a wooden garden shed?
Which assumes that using glue is appropriate, when nails or screws might be better.
This behaviour is also described in “How To Ask Questions The Smart Way” by Eric Steven Raymond: Describe the goal, not the step.
Is there an expression for this kind of questions? It is similar to “begging the question”, but not quite the same.
A leading question is one that suggests an answer, usually one that the asker assumes or desires.
While it usually is used to mean the question leads into an answer that the asker desire for legal reasons, it certainly works to mean what you are saying – a question that presumes an answer will lead from what they have asked.
Note that the first example you gave wasn’t truly a ‘leading question’, since the asker is setting a specific set of parameters: How to get a cheap taxi to the airport. They have a set goal in mind, but those goals are clear and part of the answer that should be provided. Whereas ‘putting a garden shed together with glue’ is an assumption by the asker, and thus is a leading question.