I don't understand what is your problem? VBUS input source is MicroUSB, D1 and Q1 are battery input and VBUS selection circuit