Device-to—-device (D2D) communications, a fundamental technology of the 5G communication network, has generated a lot of study interests. D2D communications may, however, have limited benefits if D2D users live far apart or if the communication environments are unfavorable. One interesting approach to increase the range of D2D communications is to support the communications with relaying technique. In this work, we investigate the power control issue and assist the underlay D2D communications using a two-way amplifiers and forward relay. Specifically, we develop the power control problem as an enhancement of the performance of the D2D link while satisfying the quality-of- service (QoS) demand of the cellular link. For the D2D link, two optimization goals are taken under consideration: maximization of the minimum SINR at D2D users and maximization of the sum-rate of D2D users. We can derive the ideal solutions by comparing the several optimal solutions for the three boundary conditions for the first optimization objective. Based on difference of convex (D. C.) structure, we can transform the objective function into a concave function for the second optimization objective and solve the optimization problem iteratively. The performance of the D2D link can be improved by the suggested power control system, according to simulation results.