This relation is a result of the important theorem for inverses of composite functions:

Thus all the solutions to the equation $f(x)=b$ correspond to all the solutions to $f_1(x)=a$ where $f_2(a)=b$.

Thus the set $f^{-1}(b) =\{x : f(x)=b\} = f_1^{-1}(f_2^{-1}(b))$. ("socks and shoes").

If $ f: x \to b$, then $(f_2 \circ f_1): x \to f_1(x)=a \to b=f_2(a)$ and so $x \in f_1^{-1}(f_2^{-1}(b))$.

A mapping diagram can visualize this result by visually following arrows in the mapping diagrams back from $b$ to all $a$ where $f_2(a) = b$ and then back from such $a$ to all $x$ where $f_1(x)=a$.