A few points to remember about time building for you IFR.
1. For the safety pilot to log PIC you must meet these critarium
a. pvt pilot with catagory and class
b. designated as THE pilot in command
c. only log the duration of flight when sole manipulator of the controls
d. may also log PIC when the flying pilot is 'under the hood.'
please sea FAR 61.51(e)(1)(iii), 61.3(a), and 91.109(b)(1)
2. Other pilot must not assume the possition of THE pilot in command, but only log PIC (when sole manipulator of the controls)
3. Rember that you are doing this to save money
a. Best case scenario. If you split your hood time requirement to 15 hours with CFI and 25 Hrs with safety pilot on XC flights you can return the favor and act as safety pilot for the other pilot for another 25 hours XC. This way, both pilots get 50 hours XC and 25 hours hood time. You both only need 15 hours with a CFI. Here's the big gotchya. Hours mean nothing if you cannot fly theplane. If your safety pilot is not a CFII make sure both you and your safety pilot work closely with one.