We analyze the opportunistic relaying based on HARQ transmission over the block-fading channel with absence of channel state information (CSI) at the transmitter nodes. We assume that both the source and the relay are allowed to vary their transmission rate between the HARQ transmission rounds. We solve the problem of throughput maximization with respect to the transmission rates using double-recursive Dynamic Programming. Simplifications are also proposed to diminish the complexity of the optimization. The numerical results confirm that the variable-rate HARQ can increase the throughput significantly comparing to its fixed-rate counterpart.