Longtime Washington commentator Jeff Greenfield is working on a book about a favorite political guessing game: What if John F. Kennedy had served a second term?

Greenfield’s “If Kennedy Lived” will be published in October, a month before the 50th anniversary of JFK’s assassination, G.P. Putnam’s Sons announced Monday. The book will draw upon scholarship and insights by Doris Kearns Goodwin, Robert Dallek and other historians as Greenfield considers such perennial questions as whether Kennedy would have avoided a land war in Vietnam.

Greenfield, 69, was a speechwriter in the 1960s for JFK’s brother, then-Sen. Robert Kennedy, and has served as an on-air analyst for PBS, CNN and ABC. His previous books include another speculative work, “Then Everything Changed: Stunning Alternate Histories of American Politics: JFK, RFK, Carter, Ford, Reagan.”