Speed Factor

Recently i have seen this question and i am unable to find a logic for this.

Here the bike goes with certain speed and after every X minutes the speed decreases. So he increases the speed after every Y minutes. To set the bike in normal condition he have to give K minutes of high speed or 2K minutes of low speed assuming that bike is getting high speed and low speed evenly.

Input:
X =4 Y=2 K=7
Output:
7

Here we need to find the total time to get the bike into normal state