can someone please explain to me the meaning of -(으)ㄴ지/-는지? I'm kinda lost
For extensive "know/don't know" phrases, that is "how to (verb)" or some kind of information, there is that ㄴ지/는지 addition to the action that one knows/doesn't know how to do (and you really don't need to say 어떻게 either). For instance, you can't say "나는 자전거 어떻게 타는 것을 알아요" I used to say it in this way before but was always corrected to adding "ㄴ지/는지". 열차 언제 오는지 몰라요. - I don't know when the train is coming. Sometimes Koreans also add 줄 before 알다 or 모르다. -> 나는 자전거 타는지 (줄) 알아요. - I know how to ride a bike.
It is a particle that makes the preceding verb a noun: like "The Solving" (of the puzzle)
You can also think of 지 replacing 것 in the gerund 풀는 것 (to solve) due to uncertainty (in this case, how to solve but it could also be where, what, which, when, etc.). If no question word is explicitly present then I believe 어떻게 is implied