Android Tablet with Infrared Receiver and Wifi Ad Hoc Possible?


I have an idea want to ask if this can be done by using Android Tablet.

Hardware that needed:

1. IR Transmitter (custom make)
2. IR Receiver with USB port (buy from store if not find I can custom make)
3. Android Tablet
4. Mobile Phone Andriod/Iphone

Please check the attached picture. The Andriod Tablet is connecting with the IR receiver. Here is how it works:

1. The IR Tx sends a signal out
2. Once the IR Receiver received the signal
3. The Android Tablet will send a signal to the mobile phone by Wifi
4. Once the signal received by the mobile phone, the phone will process the signal code and find the corresponding sound clip then play the sound on phone speaker/headset

Is this gonna work by using Android Tablet?

I have some questions:

1. Android Table and the Mobile phone, are they able to connect using wifi peer to peer? If yes, what is the distance?
2. Is it possible the Andriod Tablet programming can control the "IR Receiver with USB port". If yes, where should be the key programming area should study?
3. Is it possible that the Mobile Phone Andriod/Iphone programming can be done of what I need?

Thank you for your help. Any advise is welcome.