Injection of carbon dioxide into a reservoir saturated with methane and water