This can be verified using the associative property for function composition:
#(g circ f) circ (f^{-1} circ g^{-1})=g circ (f circ f^{-1}) circ g^{-1}#
#=g circ id circ g^{-1} = g circ g^{-1} = id#,
where #id# represents the "identity function" #id(x)=x# for all #x#.
The property is called the "socks-shoes property" because if #f# represents "putting your socks on" and #g# represents "putting your shoes on", then #g circ f# represents "putting your socks and shoes on" and #(g circ f)^{-1}# represents "taking your socks and shoes off". The fact that #(g circ f)^{-1}=f^{-1} circ g^{-1}# means that, to do this, you must "take your shoes off" (apply #g^{-1}#) before you "take your socks off" (apply #f^{-1}#).
A similar type of thing happens with matrix multiplication, or indeed, in any group #G#. Given a group #G# and #a,b\in G#, #(ab)^{-1}=b^{-1}a^{-1}#.