The seed of the idea came from one of my kids, who always liked the lettering on the cover of a book called Sudden Mischief, where three letters from the title are in a different color and spell out another word. Besides that one cover, I tend to make a lot of wordplay jokes with my kids, so the thinking came naturally. Once we started thinking in that direction, I realized that the letters for Torah were included in the letters of Harry Potter, and then realized that they were in reverse order. From there it took some experimentation to make it look right.
Someone else asked me if I meant the reversing of Harry Potter to be an allusion to Hebrew going right to left, and to be honest, no, I hadn't thought of that. But I do like the implication of the image that the book finds Torah within Harry Potter, which it does.