Connection of TWO IBT_2 to Arduino R3,wifi and four motors

Dear Great Team,can someone guide me on how I can connect the two IBT_2 to my Arduino Rev3 together with the four Motors and the WiFi Shield and how can I include the motor shield too.Consequently I intend to use my mobilephone app to control the robbot.I will appreciate any help.Im also asking is someone can help me with the sketch which will guide the operation of the two IBT_2 on my arduino Rev3/uno

Regarding code the advice is to make small test codes that operate just one type of I/O at the time. Then You will know what that device needs, how it works.
Don't throw all hardware into the sack, shake it and ask for help. That's a nightmare for everyone. That's not the way to do "system integration".