There's a button which makes the prince run along walls (the R button on the gamecube version) when running parallel to a wall; the same button makes the Prince run straight upwards when pressed when running straight at a wall. Before the Prince backflips off the wall press the regular jump button and the Prince will jump away from the wall. Just before the Prince makes contact with the opposite wall press the jump button again and he'll rebound; repeat when at the next wall. As frogbeastegg says it's pretty tight timing, but there seems to be margin for error just before you make contact with a wall so press a little early rather than too late.