Derivation of a formula will help you familiarise with the roots and concepts of that formula which can help you retain the same for long time in your brain. Things that are at the beginning and at the end are memorized the best serial position effect. And consuming water at regular intervals.
Use flash cards revise and test yourself.
To get really fast you want to fill your Memory Palaces quickly. And consuming water at regular intervals. When you recall one memorized information the second one will. For the following steps in this method well be trying to memorize these states and their capitals.