Infinitives do not have case markers. "Mi ŝatas lerni" is the typical order, and so is "egzameni asisti la detektivon".
But could "lerni ŝatas mi" work, noting that "mi" is not in accusative and is thus the subject? If so, then "la detektivon asisti egzameni" should work, as well as any other SVO order of these words.
This also raises the question: what about a sentence with just infinitives as nouns: "legi asistiasistas skribi" ("reading helps writing"). Is it not possible to move those words around? I would expect that it isn't.
Dankon al ĉiuj