motor working unintendly
The 1117 regulator if it's anything like the LM1117 regulator, needs a bigger margin of input to output voltage for it to deliver current to the ESP8266 chip.

I suspect that when both motors are activated the voltage droop on the battery is passed through to the output on the 1117 regulator and this causes the ESP chip to reset or misbehave.

The LM1117 regulator requires typically 1.1 volts between input and output when supplying only 100 mA and if you look at figure 1 in the TI data sheet it needs typically 1 volt when supplying virtually 0 mA.