We consider a two-way relaying (TWR) system, where two user nodes communicate each other via a relay node adopting a three transmission phase (3P) analog network coding (ANC). In the 3P ANC, the relay node broadcasts a linear combination of the signals received from the two users in different phases. For the proposed scheme, we derive the outage optimal relay power allocation (RPA). When a direct link (DL) is available, we also propose a suboptimal RPA to avoid the requirement of feedback of the DL quality. Simulation results show that the 3P ANC with the suboptimal PRA, at a negligible loss compared to that with the optimal RPA, outperforms the other conventional schemes when a DL is available.