DNP gives you cravings because it uncouples the ATP production of your mitochondria. This means that it causes them to leak protons which should have been used to make cellular energy, but instead converted them into heat.
The end product of this is that you are starving the cells in your body of energy, and your hypothalamus takes its job of preventing you from starving your cells to death semi-seriously, so it sends a bunch of chemical signals for you to eat some food, so your cells don't die. Now obviously there's a spectrum between not leaking protons and turning most of your protons into heat so that you cook yourself, which is why some people have died from DNP and others lose weight.
As to whether some testosterone will help you gain muscle while losing fat using DNP, I'm not positive because I don't know of any evidence as a result of people who have tried this in a quantified way, but I would say if you're denying your cells energy because you're turning it into heat, it's not likely you will have the ATP necessary to repair muscle unless you eat enough food to make sufficient ATP, which means you're probably just going to make a lot of heat but not lose weight. So why take the DNP at all?