The joke is a play on words.  Boomerangs are designed to return to the point they were thrown from when flung through the air.  The phrase 'it came back to me' can usually mean 'I remembered it', but in this case the boomerang might have literally come back.
I couldn ' t quite remember how to throw a boomerang , but eventually it came back to me .