In education, it's called a worked example. The problem is presented together with the solution.
"A worked example is a step-by-step demonstration of how to perform a task or how to solve a problem" (Clark, Nguyen, Sweller, 2006, p. 190). Worked-examples are designed to support initial acquisition of cognitive skills through introducing a formulated problem, solution steps and the final solution (Renkl, 2005).
Here is an instance of the term used in a dictionary example (emphasis, mine):
1.1 A written problem or exercise designed to illustrate a rule.
‘a workbook and a data set will enable the researcher to follow worked examples’