Are few months enough to prepare for a race with such magnitude. Mostly no. I say mostly no because it depends on the person's general level of fitness, health, regular exercise and healthy eating. In best cases six months is a brief time to prepare for a marathon, and might lead to injury, even severe one.
When you use google search, like I did in the beginning to get an idea about marathons and how to prepare for them, you will end up with thousands of search results from article and books etc. Some books claim they will prepare you for a marathon in four months, others claim to prepare you for a record finish time! But reality is unlike what those books and websites claim.