A Two-Stage Approach for Efficient Power Sharing Within Energy Districts