Nishmitha,
You will have problems since XIR2 and XI 3.1 DOES NOT support 64bit CMS & Audit Databases and BI 4.x requires 64bit database. You will be have be very carefully what Oracle Client is used to connect. You will also have to find a version that is supported by XIR2 / XI3.x / BI 4.x
XIR2 supports 10.2 (32bit), see below
XI 3.1 w/ SP6 also support 10.2 (32bit) & 11.2 (32bit)
BI 4.0 w/ SP5+ Support 10.2 (64bit) & 11.2 (64bit)
Your best choice would be to install XIR2 & XI 3.1 on 10.2 (32bit) and BI 4.x on 11.2 (64bit). You will NOT be able to install ALL the CMS & AUDIT on ONE database because of 32/64bit issues.
Regards,
Ajay