I can give you example. Keep/still = tetap.
In spite of him telling them to stop cooking the rice, they kept cooking it. Meskipun dia menyuruh mereka berhenti memasak nasi, mereka tetap memasaknya.
This indicate that even if "case/event X" happened, "A" would still (tetap) do it.
While the other one Still=Masih
When he arrived at home, they are still cooking rice. Ketika dia sampai di rumah, mereka masih memasak nasi
Notice that "they are still cooking rice" instead of "they still cook rice" This sentence indicate that before he left the home, they already have been cooking rice. When he arrived back at home, they still cook rice. In this case he didn't tell them to not cook the rice.
In short 'still'(masih) is used when there are many things happening/occurrences, yet they 'still' (masih) do the same thing. Another example, he took a bath, they still (masih) cook rice; he ate dinner, they still (masih) cook rice, and so on...
Sorry I can only give examples, there are other specific use for these words. Although I'm a native Indonesian speaker, I can't explain more. The difference between these words is too subtle to be understood by foreigner with minimal exposure to the language. But when I hear it in the wrong context, I know it's wrong.
You can just remember Keep=Tetap, Still=Masih