Student B's claim is correct. Petroleum is formed slowly over millions of years from the remains of ancient organisms that live in shallow seas. This process requires specific conditions, including high pressure and high temperature, which take considerable time to develop. The transformation of organic material into fossil fuels like petroleum occurs over geological time scales, not rapidly.
Due to this slow formation process, the rate of petroleum consumption today far exceeds the rate at which new petroleum is created. This means that though there are significant known reserves of petroleum, these reserves are finite. Once they are depleted and new sources cannot be formed quickly enough to keep pace with demand, we could experience shortages. Therefore, it is possible that the world could eventually run out of petroleum, particularly if alternative energy sources are not developed and adopted to replace it.