Rhetorical device? Answer question with example of the answer showing how to find the answer
This is an example of the principle of Show, Don't Tell: using demonstrative techniques, rather than blatant or thinly-veiled narration, to establish narrative elements.
The definition above comes from creative writing, but we use it at lot in scientific and technical teaching, too.