Suggest you do a search on logging hours and what is and what is not legal. This has been discussed numerous times. Usually in relation to the "cheap" multi hour packages advertised in various flying magazines over here in the UK.
Here is one such thread that you might find useful:-
http://URL=http://www.pprune.org/for...logging+hours]
In the UK under JAA rules it is not possible to log pilot in command time where you have a safety pilot or for as an example 2 people in a aircraft certified for single pilot operations to both log PIC. The rules say that you must be the sole manipulator of the controls at all times (I think!!).
I am not sure where you are based but suggest you check your own local rules if outside of the UK.