Yes you can tap off of 2 of the batteries for your 24v motor. I am assuming you will recharge before going back to the 36v setup though. If not there will be a power sag from the 2 batteries that were used to power the 24v motor. Keep in mind if you tap off the 24v a lot eventually 1 battery will aoways be stronger then the other 2. So if you can rotate between the batteries so they all have simular cycles.
Bob