Rep. Paul Ryan (R-Wis.), left, Vice President Biden conclude their vice presidential debate at Centre College in Danville, Ky., on Oct. 11, 2012. (Michael Reynolds/Pool via EPA)

The last time they spent this much time together, Vice President Biden and House Speaker Paul D. Ryan (R-Wis.) tried to tear each other apart.

Throughout their 90-minute vice-presidential debate in 2012, Biden smiled and sighed, mocking the Republican nominee, while Ryan singled out Biden’s home town of Scranton, Pa., as an example of the Obama administration’s failed economic policies. “Look, folks,” Biden said at one point, “use your common sense. Who do you trust?”

But now, 31/2 years later, Ryan and Biden will sit together, and sometimes stand together, behind President Obama on Tuesday as he delivers his final State of the Union address. It fell to Ryan last November, in his new role as speaker of the House, to officially invite the president to address the joint session of Congress.

Both Ryan and Biden have aspired to stand in the president’s shoes and not in his shadow, as they will do Tuesday. But together, their two remarkable political careers represent a Washington tale of ambition, success, and how to pick up the pieces after personal tragedy and bitter defeat.

Biden, 73, and Ryan, 45, do not have a close relationship. One spent 36 years in the Senate focused on foreign policy, and the other has been in the House 17 years focused on budgets and economic policy. They are generationally and ideologically far removed from each other, and their personalities could not be more different: Biden is the gregarious, back-slapping pol who frequently gets caught on a hot mic being a little profane or talking a little golf. Ryan is the analytical policy maven who used to walk the Capitol halls with headphones on, listening to heavy metal.

Ryan’s aides later admitted that their 2012 debate prep, including GOP lawyer Ted Olson playing an over-the-top version of Biden, probably didn’t go far enough to ready the cerebral Ryan for what was to come. Ahead of his first stint seated behind the president, Ryan’s wife, Janna, has given him strict instructions: No grimacing when Obama says something he considers outrageous, and finally learn to keep a good poker face, according to his advisers.

But their careers have a similar arc. Both Ryan and Biden considered running to succeed Obama this year, but each took a pass because of family considerations.

While Biden’s decision effectively ended any chance of him winning the presidency, Ryan has a few more decades to consider a presidential bid. But his recent move into the speaker’s office is fraught with peril on that front. With his new job, he has become the embodiment of Congress, usually a political dead end in any age, but even more so during this historically unpopular era on Capitol Hill.

Some of Ryan’s biggest supporters believe his chances of becoming president ended when he decided to take the speaker’s job in an effort to unify a deeply fractured House GOP caucus.

“I think he recognizes that. Not since Polk has anybody left this office and become president,” former speaker John A. Boehner told reporters in a farewell interview during his last week in office. And James K. Polk quit Congress in 1839 to become Tennessee governor before his successful 1844 presidential bid.

For now, Ryan’s friends say that he is just trying to focus on being speaker. Long-term planning for his career has never been a Ryan specialty.

“I think he does so well because he actually doesn’t look for his next job. He looks to do the job he has really well,” said Rep. Sean P. Duffy (R-Wis.).

As dissimilar as Ryan and Biden appear from the outside, the young House speaker might want to study Biden’s trajectory to figure out what he wants to do in the decades ahead.

Ryan was elected as a 28-year-old Midwestern up-and-comer, just as Biden won his first Senate race at 29. Both men were ambitious but took the long view on Capitol Hill, building up their policy bona fides and not claiming a congressional chairman’s gavel until their 13th and 15th years in office, respectively. At 42, Ryan jumped onto the national ticket as GOP nominee Mitt Romney’s running mate, leading to his first and only loss in elected politics. At 45, Biden launched a bid for the Democratic nomination, but by the fall of 1987 he had flamed out amid charges of plagiarizing speeches and other résumé-inflation allegations, the first time he ever dealt with political failure.

They are both Irish Catholics who are very public about the importance of their faith. Family tragedy tested each man early in life. Biden, just weeks after winning his first Senate race in 1972, learned that his wife and daughter were killed in a car crash in Delaware, leading to a daily ritual of taking Amtrak home every night to see his young sons.

At 16, Ryan discovered his 55-year-old father at home in bed, dead of a heart attack. His family and friends have said the loss transformed him into a more serious, driven person.

They are both respected enough within their party establishment that some insiders continue to float them as presidential possibilities under far-fetched, break-the-glass moments: If, say, Democratic front-runner Hillary Clinton’s problems involving an investigation into her email server made her unelectable, Biden is cited as the fall-back option by many Democrats. And if the crowded Republican primary field were to leave no one with enough delegates before the July convention, some Ryan supporters cling to the idea that Ryan could again be the white knight who rides to the party’s rescue.

Instead, they both intend to play supporting roles in the 2016 campaign. Ryan and a close friend, Sen. Tim Scott (R-S.C.), hosted several presidential contenders Saturday at a South Carolina summit designed to push conservative ideas to combat poverty, and he repeated Thursday his vow to make 2016 “the year of ideas” on the House floor to create a ready-made agenda for whomever the party nominee is.

Biden is expected to be a robust campaigner on behalf of Democrats, particularly in Senate races across the Midwestern states that will probably decide the majority. After his 1987 failure, Biden set aside his presidential ambition and had a 20-year run of legislative accomplishment on crime and foreign policy, becoming a respected elder statesman who was the right balance to Obama as his vice president.

The long-term question for Ryan is whether he spends the next decade building policy accomplishments or whether he will try for a short, successful term of a few years as speaker, then move on to a different venue to position his political future without congressional taint.

Friends believe that, for now, Ryan will spend Tuesday night thinking only about the job at hand.

“I seriously doubt that Paul would sit in the chair at the rostrum and think, ‘I wish that was me giving the State of the Union,’ not at all,” Duffy said. “I think he’s here to do a great job in his ability as the speaker.”