In a battle between equally matched heroes with equal armies, the ratio of attack and defense is practically irrelevant; what matters is their sum. That is, 3+7, 2+8, and 10+0 are approximately the same. The difference will be in the amount of damage, although it will be relatively small for both heroes.
If you have to choose whether to increase attack or defense, it depends on the tactics you use in battles. As Fireball wrote, if the troops are tough and have low damage, then increasing defense is more beneficial. If they have high damage and low hit points, then increasing attack is better, but again, depending on the battle tactics, this can all change.
Auto-translated