"The magpie knows how to solve this puzzle."
Translation:까치가 이 퍼즐을 어떻게 푸는지를 알아요.
The "알아요" has nothing to do with a magpie. "알아요" applies to an omitted subject (speaker).
저는 까치가 이 퍼즐을 어떻게 푸는지를 알아요. - I know how the magpie solves this puzzle.
까치가 이 퍼즐을 풀 줄 알아요. - The magpie knows how to solve this puzzle.
까치는 이 퍼즐을 어떻게 푸는지를 알아요. - The magpie knows how to solve this puzzle.
The subject which 알아요 (knows) should be with 는 only. 가 is wrong.
저는 하이 씨가 누구와 만나는지 알아요.
I know with whom Hai meet.
저는 어떻게 요리하는지 알아요.
I know how to cook.
저는 하이 씨가 무엇을 먹는지 알아요.
I know what Hai eats. (not Hai knows)
하이 씨가 지금 밥을 먹는지 모르겠어요. ( = 하이 씨가 지금 밥을 먹어요? 저는 모르겠어요) I don't know whether Hai is eating know. (Is Hai eating know? I don't know.)
수업이 시작했는지 모르겠어요. ( = 수업이 시작했어요? 저는 모르겠어요) - I don't know whether the class already started. (Is the class started? I don't know.) Source: https://blog.naver.com/daisy9074/221999628958
"푸는지를" is only part of an indirect question.
But roughly, "푸" from the verb 풀다(to solve) belongs to the preceding question clause while "-(으)ㄴ/는지", known as connective ending, is a tool to turn indirect interrogative clauses (/indirect questions) into noun clauses which can then be used in various noun constructions e.g. as subject; object; complement etc.
"-는지" works on a similar concept as "-는것" which is used to nominalize indicative clauses.
In this instance,
▪The direct question clause is "how does one solve this puzzle?" 이 퍼즐을 어떻게 풀어요?
The indirect question clause would be "how one solves this puzzle" 이 퍼즐을 어떻게 풀[...]
This can be turned into a noun clause by adding -는지 to 푸 from 풀다 giving "푸는지". (풀다 being an ㄹ irregular verb loses the 'ㄹ' in the process.)
"이 퍼즐을 어떻게 푸는지" how one solves this puzzle or how to solve this puzzle.
It is now a noun phrase.