This paper considers a hybrid relay network consisting of the source, the amplify-and-forward (AF) relay, the decode-and-forward (DF) relay, and the destination. In hybrid three-hop relay systems, the transmitted signal from source can be received at the destination after processing the signals through two relays. If the first relay amplifies and forwards the received signal, and the second relay decodes and forwards the received signal, the system model is considered to be an AF-DF relay system. The reverse case is considered for the DF-AF relay system. The AF-DF and DF-AF relay systems have different error rates and achievable throughput with respect to the channel conditions between two nodes. We propose optimal power allocation schemes for two different relays in order to maximize the achievable rate under a sum relay power constraint for given channel gains and transmit power from the source. By solving the optimization problem to maximize the achievable rate for each relay network, the transmit power values in closed form are derived. When the channel gains are the same, the optimal power allocation scheme for the AF-DF relay network proves that greater power should be allocated at the first relay to maximize the achievable rate. In the case of the DF-AF relay network, we derive an optimal power allocation scheme for the four possible cases. Under the same signal-to-noise ratio (SNR) condition, at the first hop we show that the achievable rate of the AF-DF relay network is greater than that of the DF-AF relay network when the channel gain between two relays is greater than that between the second relay and destination. Simulation results show that the proposed power allocation schemes provide a higher achievable rate than the equal power allocation scheme and the grid search schemes.