The answer depends upon the type of motor. A synchronous motor can usually be driven as an alternator by simply substituting a prime mover for the mechanical load. Things are less clear for an asynchronous/induction motor since it will depend upon whether it is attached to a three-phase supply or not.
If there is a three phase source then the prime mover has to operate at greater than synchronous speed, however its output frequency will be locked to the line frequency, assuming that the source is considerably larger than the motor size.
If there is no external source of power then there will be no output since standalone/isolated induction generators have no means of creating a rotating magnetic field; however it is sometimes possible to use an appropriately sized capacitor bank in combination with the residual magnetism (if any), to use resonance to self-excite at whatever speed the prime mover can provide. A third type called a DFIG is beyond the scope here.
Further to the above, any induction motor is ready to act as a generator if it is connected to the mains. For example if you have a conveyor operating downhill it will start and run as a motor and if you put enough material on the belt going downhill, this can result in the belt driving the motor slightly faster than synchronous speed and the motor will deliver the resultant power into the mains. Another example is a crane hoist, when lowering a large load can generate power into the mains. When you open the contactor or the mains is off the motor will lose voltage and then cannot act as a generator.
If you want an induction motor to self-excite as a generator you need to connect a sufficient capacitor across one or more of the windings then drive the motor at or above synchronous speed and it will self-excite and be ready to deliver power to loads. This method is used for small low cost power generation schemes called micro hydro.
1. Using a three phase inverter drive that is capable of converting.
2. Using capacitor bank.
3. Or the simplest method is using a 3 phase motor and a small single phase motor to start your 3 phase motor that powers your 5hp.
The wiring is simple.
Wire phase A of your two 3 phase motors together. Then wire Phase B of your two 3 phase motors together with one side of the single phase line input and wire phase C together with the other side of the single phase line input.
But there is several considerations that need to be taken into account.
First is you have to have larger 3 phase motor for you supply motor(for a 5 HP motor for the lathe, a 7.5hp will be needed).
A small single phase motor attached by a belt and pulley to your 3 phase 7.5 hp motor to turn it.
Then all you have to do is first start you single phase motor and get the 7.5 hp up to speed. Then engage the single phase power to the 3 phase 7.5hp motor and the three phase 5hp motor will run( after 7.5 is up to speed and single phase power is supplied to the 7.5hp the small motor is no longer be needed and can be turned off). You can use a reversing switch to start and stop the 5 hp motor the power will be continuously supplied as long as the 7.5 hp is supplied with the single phase power.