If the use case for the app is personal use by the possessors of the textbook, very likely no problem. For all other uses you should consult a lawyer to make sure you're in the clear.
Shouldn't this imply that it's illegal for me to make quizzes on my own from information I found in a textbook? If this app is implemented correctly, what it does should be indistinguishable from a human. It makes no sense to change the infringement status of a work based on how the work was produced.
Also, generally hard facts (like when Hitler died or how Hitler killed himself) are not copyrightable.
Of course if you need legal advice you need to consult a lawyer.
So the more interesting question here: is a computer legally allowed to generate an original interpretation of text on a page?
A. They probably cache only for a little while
B. They aren't republishing it