What is the best way to train a person to ride?
This is kind of two separate questions on the same topic.

Person 1 can pedal okay, but can't balance.  A Trike might be the solution here.  It almost totally removes the need to balance, but trikes are much rarer, and being wider are less versatile.   Another idea is to remove the pedals, and get her to scooter around like a balance bike.  Optionally the entire crank/bb axle could be removed too else it risks catching the rider in the shin/calf.

Person 2 balances OK but cannot push the pedals?  That's unusual.  I'd suggest putting P2 on a trainer, or an exercise bike so they can focus on pedalling.  Rollers are not suitable because they need balance and pedalling together.

If there are medical or developmental reasons for these difficulties, you might need to consult with a doctor or a physiologist, or someone specialising in whatever condition may be the cause.

If these are young kids, don't stress too much.  Just encourage practice as play and make it fun.