"In traditional RPG adventure design, players wander the map in order to solve puzzles, interact with characters, and other elements that will move the story forward. Players, as the Mario and Luigi team, actually control these sprites independently as well as in pairs; some areas require the duo to split up in order to get through certain locations in the game. Mario and Luigi must work together, using their special abilities that will help each other out to solve specific challenges. Getting through a hole in a wall, for example, requires one of the brothers to slam a hammerhead down on the other, squashing him down flat to get him to fit through and trigger a hidden switch. Mario & Luigi is filled with elements like this, and half the fun is discovering the wacky resolutions to specific situations. Battles are not realtime...players can see exactly when a battle's forthcoming since all the enemies are revealed on the overhead map. And what's more, if players are quick and nimble enough, they can get the upperhand on the enemy by advancing on it and attacking it, even before the battle begins. Watch out, as the enemy can do the same...knocking Mario and Luigi on his butt before the attack sequence starts.
The battle engine is very, very similar to Paper Mario. Players not only choose how to defeat certain enemies by working within a menu system, but they also have physical, direct control of specific movements for attacks and defense. If an enemy attacks, for example, players can "save" the character being attacked with a realtime defense move (early in the game it's just a "jump"). For attacks, players can amplify the power by timing the button press at the point of impact...or pull off a move that requires several controller and button presses in sequence. Players can choose to up the power of these attacks by making them faster or removing the helpful on-screen button icons, but these have a higher rate of failure." -IGN
As you can see, it's more complicated than A for Mario to jump, B for Luigi to jump...