Device-to-device (D2D) communication is considered as a promising resource reuse in cellular networks. However, the allocation of channel resources and power to D2D communication require precise coordination since D2D user equipments (UEs) can cause interference to cellular UEs. In this paper, we develop Nash Bargaining Solution (NBS) and Nash Competitive games frameworks to model the power allocation problem. NBS is a type of cooperative games, which has been applied for solving resource allocation problem among competing players. In the NBS game, the optimization problem is not convex. We propose a method to make the problem convex. In the Nash Competitive game, the problem is convex so that we apply KKT conditions and find a closed form solution for Nash Equilibrium (NE). Finally, we perform computer simulations to study the performance of the games. Simulation results show that our method for finding NBS has a significant accuracy. Results also indicate that D2D users have higher rates in NBS game compared to Nash Competitive game which states that the cooperation helps D2D users to gain more efficiency.