phrasal-verb
"Figure out" means to understand or solve something after a period of thought, which is exactly what the sentence describes — struggling mentally to grasp how something works. As with other phrasal verbs, changing the particle after "figure" completely changes the meaning, even though the base verb stays the same.
"Figure in" means to include something as a factor in a calculation or plan, a distinct financial or planning-related meaning unrelated to comprehension. "Figure up" is a rare, regional variant sometimes meaning to calculate a total, but it isn't standard for expressing understanding.
Phrasal verbs built on "figure" show how a small set of particles (out, in, up) can multiply a single base verb into several unrelated meanings, which is part of why phrasal verbs are considered one of the hardest areas of English for learners to master.
Quration — Quration English