If you press down or away on the control stick while hanging from the ledge, you will drop off the ledge. If you then quickly press up, you will use your double jump and either grab the ledge again or, if your character has hops or you are fast, land on the stage itself. With Ganondorf, you can drop off the ledge and grab back on repeatedly. If you do it fast enough, you will be invincible until you decide to climb back onto the stage. This is because every character has a short moment of invincibility when they first grab the ledge. Ganondorf's double jump is so small that a player can let go and regrab the ledge while maintaining that invincibility. Other characters jump higher, so they lose their invincibility by the time they grab the ledge again. While the hands are stationary, you can up-smash them. While they are attacking, you can jump or wavedash onto the ledge and use the infinite jump stall until the hands re-enter their stationary mode.
Edit: Roy's dB is his Down-B, which is like Marth's counter except it doesn't last as long and it deals 1.5 damage that the attack you countered would have done to you. I wouldn't recommend it for this event match, as one hand could grab you while you are countering the other one.