That's very debatable, whether the Taliban follows any religion.
It's not what the farmer makes, it's what the Taliban will allow the farmer to make. You say the net to the farmer can be better doing it for legal drugs than illegal drugs, but I'm not sure the farmer has any input into that under the Taliban.