Ganondorf is one of those few characters Lucario can easily outmaneuver.
Between (slightly) better mobility, AS (and FP flames to an extent) projectiles, and the capacity to potentially gimp Ganondorf offstage, I'd give Lucario the advantage in this matchup pretty handily.
That being said, clever and sharp-eyed Ganondorfs are downright nasty to Lucario if you let your guard down and eat a few well-placed power-hits from him. Get caught in the wrong place at the wrong time, and Ganodorf will end Lucario, at disturbingly lower percents than we're typically watching out for to boot.