That's actually not too difficult. All you need is a script that executes when the player speaks to the baker. The script would be something like this:
msg ("You must be here for the baking challenge and you want the perfect pie crust. If you want the crust, you have to answer my riddle.")
msg ("The riddle is: What do you call cheese that is not yours?")
player_response = GetInput()
if (player_response = "nacho cheese") {
msg ("Correct! Here is the pie crust.")
pie_crust.parent = player
}
else {
msg ("I'm sorry, that's not the correct answer.")
}