I will start with Hannibal, he was educated, cultured and he Lead his army by example, he was too close to his soldier, ate, slept among his soldiers and wear as them to show that he is like them and give courage and know about their problems in order to build healthy climate. And I think he gain respect and trust of his soldier and he was a man of honor he was not just telling and only make orders, he was doing and led the army from the front and was the last to leave the battlefield.
To note that during the battle of Cannae, Hannibal stood with his men in the weak centre and held them to a controlled retreat. Hannibal had a great vision of conquering Rome and had the ability to articulate it. This vision captured the hearts and minds of his men, and most of them willingly followed him. He was so persuasive and for more than 15 years he was able to receive necessary reinforcements and support by convincing the Italian that the war was not with them.
Each details seems to have been executed, planed and orchestrated with precisions. He was able to maintain the integrity of the army. There were a good communication between chain of command and soldiers. He was able to visualise the battle before it started. Soldiers have confidence and execute his order which allowed the victory of the battle. He was able to Ensure Long-Term Organizational Success, he gained several battles as Trebia and Lake Trasimene and was able to recruit people in his army.
Hannibal, on the other hand, was able to Improve the Organization and recruit people in his army even when he was in Italy and had deployed his forces based on the particular fighting qualities of each unit, taking into consideration both their strengths and weaknesses in devising his strategy.
Concerning Romans, two consuls, Varro and Paullus, alternate their command on a daily basis (Varo first day and Paullus the second day). Varro was determined to defeat Hannibal and he is a man of reckless nature and hubris and he overestimate the capacity of the Roman army and Varro believed that in an open battlefield, when
Bearing in mind the fact that Hannibal’s two previous victories had been largely decided by his trickery and ruse, Varro had sought an open battlefield. The field at Cannae was indeed clear, with no possibility of hidden troops being brought to bear as an ambush . Unlike Varro, Paullus was prudent and cautious, and he believed it was foolish to fight on open ground, despite the Romans’ numerical strength. Paullus was justifiably cautious about facing Hannibal on his enemy’s terms.
The Romans based on pervious battle and experience, set up in a traditional block formation so they focused and invest heavily in the center not in the wings, and both council were leading roman army from the wings and as consequences there was a lake of communication. They think that the number of the army will crush Hannibal. As they are very arrogant and sure that will win the battle they didn’t think about other strategies.
Hannibal knows that he cannot beet the roman with traditional strategies, so he arranged his army in an unconventional formation designed to use the Romans’ momentum against them, taking into consideration both their strengths and weaknesses in devising his strategy. For these reasons Hannibal won the battle of Cannae.