How could a doctor fix a babies legs that are very badly bow legged?

They shouldn't. The vast majority of babies who have bowed legs are normal. Their knees will straighten out as they grow. However, babies should be evaluated by a physician. There are a small number of children who have growth or nutritional deficiencies that need to be treated with nutritional supplements or surgery.
We let them grow. They grow out of it if xrays are normal we let them grow out of it later if very bad we can slow growth on outside of knee and let the knee grow traight see pediatric orthopedist.