President Biden will kick off a three-day tour of Pennsylvania, a crucial battleground state, with a speech on Tuesday that focuses on taxes and aims to contrast his policies with those of former President Donald J. Trump.

In Scranton, his hometown, Mr. Biden is expected to talk about the tax code in the frame of economic fairness, arguing that Mr. Trump’s tax cuts benefited billionaires while his own agenda has helped working- and middle-class families.

The president “will outline how Trump’s tax plan is a handout to the rich and leaves the middle class holding the bag,” Michael Tyler, the Biden campaign’s communications director, said during a call with reporters. “The address will drive home a simple question: Do you think the tax code should work for rich people and for corporations or for the middle class?”

All of that is standard election-year fare. But the backdrop to Mr. Biden’s campaign swing could not be more unusual. In an unprecedented trial, Mr. Trump is spending most of this week, and much of the coming month or two, in a Manhattan courtroom facing criminal charges. Democrats hope that the contrast of Mr. Biden campaigning and carrying out the duties of a president while Mr. Trump’s lawyers plead his innocence will highlight the choice voters face in November.

And Mr. Biden must also contend with the fallout from Iran’s weekend attack on Israel, which raised new fears of a wider regional war in the Middle East.

On Tuesday, the day after Tax Day, Mr. Biden is likely to promote his plans for changes to the tax code, including expanding the child tax credit, instituting a tax credit for first-time home buyers and making permanent tax credits for those who buy health insurance under the Affordable Care Act.