1.
Basically variables store numbers. You can set a variable to the level of a party member. Thus, take one variable and set it to your first party member's level, then add the second party member's level to that. Then divide by 2. In the case of the level 5, level 3 situation, this will give you 4. Then, go to the add levels event command. Notice it has an option for adding a variable. Since the hero is already level 1, you need to subtract 1 from your variable so now it is equal to 3. Then Change hero level and add that variable to it.
2.
You need a script if you want the player to be able to switch it at his will. If it's just something temporary, and set by you, the game maker, all you need to do is remove the heroes from your party and add them back in in order. If you do want the script to allow the player to choose freely who leads the party, I wrote one here:
http://rmrk.net/index.php/topic,19978.0.html4.
You need to set blank events on the map, teleport them to hero position, then give them a graphic and have them move. At least, that's a suitable eventing way to do it.