Not really a good setup to run a 2 speed motor off of a VFD, I just haven't had good success in the past, and this is even with setting the VFDs with the parameters set for each motor speed. If the motor was run at the 5 Hp setting on the VFD, there would be no need to use the second low speed. A 20Hp VFD might work, but usually they are bracketed within a specific operating range/size. The VFD would need to be in a V/Hz setting, if more than one machine is operating on the same machine than you have issues with overload/fusing. On a cost basis, it may be easier and maybe about the same cost to get an inexpensive 5 HP VFD, then try to find a 5 way drum switch and all the wiring complexity. What I commonly see is to use a separate drum switch for setting the motor speeds and a separate spindle direction switch. This makes for a much less complex switch arrangement.