As long as you have an account with gamefly you can keep your rental as long as you like. Once you cancel though you will need to send the game back ASAP. I would suggest sending the game back before you cancel that way you know it will get to them in a timely manner.
Click rent then the game will be added to your game Q. After which the game on the top of your list in the Q will be the first one shipped to your address. If you wish to buy, click keep and your purchase will be made.