How do you cook nopales while keeping the green color?
I am not familiar with nopales, but I would be astonished if their green color was determined by something else than chlorophyll. Chlorophyll is usually destroyed by normal cooking techniques. If you want to keep the color mostly green (some dulling is inevitable):


cook the vegetable in an alkaline fluid. The easiest way is to use water with some baking soda added. The problem here is that humans like food which is slightly acidic, and alkaline food tastes soapy. Also, vegetable fibers soften more easily in alkaline environments, so they will be somewhat mushy. So use a very small amount. If they are to be added to a dish which is acidic (in a Mexican dish, the culprit will probably be tomatoes), cook the green vegetable separately, and only combine it with the rest of the dish at the last possible moment. Right before serving is best. 
Heat destroys chlorophyll too. Cook the green vegetable as short as possible. Blanching is perfect, don't forget the ice bath at the end. It will probably be enough as a preparation method. While I don't know how hard a nopale is, I find blanching to be quite sufficient even for broccoli (provided the water contained either salt or baking soda), and their stems are one of the woodiest things we eat. If you don't think they are softened enough after blanching, cook them longer, until you find they are sufficiently softened.