In the presence of primary user (PU), most of researches have often neglected the effect of the interference from the primary transmitter to secondary receiver in cognitive radio (CR) systems. In this paper, with the PU's interference, we investigate the problem of optimal joint relay selection (RS) and power allocation (PA) to achieve maximum throughput in spectrum sharing cognitive two-way relaying networks. A closed-form solution is proposed for optimal allocation of transmit power among the secondary user (SU) transceivers and the SU relay. Simulation results show the PU's interference degrades the effectiveness of the system. Moreover, our proposed power allocation and relay selection methods can achieve maximum throughput in the presence of PU's interference.