your freehub on the 7spd hub will be too short.
But
You can replace a 7spd freehub body with a 9spd, they are just about all compatible but you would need to re-dish the wheel and adjust the axle spacers so it all fits nice.
A good way to extend the life of old hubs.
plenty of 7spd cassettes still available though.