(CNN) Joe Biden and Meghan McCain shared an emotional moment Wednesday, with the former vice president consoling the daughter of his friend and onetime political rival Sen. John McCain.

Visiting ABC's "The View" to talk about his book, "Promise Me, Dad: A Year of Hope, Hardship, and Purpose," Biden was asked by McCain, a co-host on the morning show, about his son Beau's cancer diagnosis.

McCain's father was diagnosed with glioblasto ma , an aggressive brain tumor, in July. Beau Biden passed away from the same cancer in 2015.

"This is the hard part, bear with me, OK? I couldn't get through your book, I tried. Your son Beau had the same cancer that my father was diagnosed with six months ago," McCain said, apologizing as she began to choke up.

"I think about Beau almost every day and I was told -- sorry -- that this doesn't get easier, but that you cultivate the tools to work with this and to live with this. I know you and your family have been through tragedy that I couldn't conceive of -- what would you tell -- it's not about me, it's about everyone with cancer," McCain said, crying as Biden walked over, switching seats with another host to sit next to her.

Read More