The object is associated with the first verb that follows (since verb phrases always end in a verb). So in the first case the object is associated with 풀다 and in the second case it is associated with 알다. AbbyCW is right in that you usually see ~지 알다/모르다 not 지를 알다/모르다 but 지를 shouldn't be that surprising since it essentially replaces 것을 when there's uncertainty. In this case, "how to solve the puzzle" is the object of the verb 알다 not "puzzle".
This is weird--I took a Korean class at Yonsei University in Seoul (just to prove I have some credibility haha), and I was NEVER taught to do this thing where you write ~지를 알다/모르다. We were taught to just write ~지 알다/모르다, so I have no idea why it's being taught this way. I went ahead and flagged the exercise as being wrong, but that being said, I could be wrong and sometimes Yonsei does teach antiquated grammar :/