There is no minimum separation distance specified.
If you fly in formation then you must both agree to it, brief the procedures you will fly (R/T, breakaway, airfield approach etc) and operate safely.
If you're not in formation but are close to each other then the rules are you must not fly so close to the other aircraft so as make the pilot of the other aircraft feel he and his aircraft were endangered. Again - something to agree with your flying partner.