Americans on both sides disagreed with his decision and want America to withdraw from Afghanistan. But this was a presidential address, worthy of national airtime, in a speech of significance and substance delivered with seriousness.

On Tuesday night, it was as if a different personality inhabited the same body.

Mr. Trump began his campaign rally in Phoenix by reading prepared remarks, before deviating into a prolonged defense of his response to the racial violence in Charlottesville.

In tennis this is called an unforced error.

Mr. Trump’s 77-minute speech in Phoenix might have fired up that crowd of 15,000, but it did nothing to broaden Mr. Trump’s appeal or advance his stalled legislative agenda.

As we enter the fall, the White House, including the president, must narrowly focus on the twin goals of raising the president’s approval rating and moving his legislative agenda before 2018 begins. Anything that does not assist in these goals must be put on the back burner, as there is an opportunity cost for everything they do.

Mr. Trump’s approval rating has been hovering in the mid to high 30s, historically low for a new president. He won a shocking election victory, after a divisive and ugly campaign on both sides. His presidency has been consumed by controversy, a lack of cohesion and mistakes.

In spite of this, he has had some successes. He recruited a stellar Cabinet, confirmed a solid Supreme Court justice, used the Congressional Review Act to peel back expensive Obama-era regulations, approved two key pipelines, reformed the VA bureaucracy, and has used numerous executive orders to deliver on campaign promises.

He’s done this with no help from the Democrats, no honeymoon period and with more fierce media opposition than at any time since the early 1970s.

All that matters now is how this calendar year ends.

Congress has frittered away months of legislative time, and the reasons for this are both reasonable and ridiculous. Democrats have delayed nominees more than ever before, chewing up valuable legislative time. Regulatory reform consumed the first few weeks in the House before a key deadline arrived. Health care took two floor cycles in the House, delaying tax reform. A narrow margin in the Senate resulted in a one vote loss in the first round on health care. The White House has been unusually ineffective working with a Congress run by the same party.

These explanations do not excuse the GOP’s total lack of urgency. It is simply ridiculous that Capitol Hill Republicans failed to use the transition period after the election to forge a consensus on a replacement for Obamacare. Tax reform is finally coming together, with a major push before Thanksgiving. Precious recess periods have been uninterrupted, save for one extra week in early August in the Senate.

There is still sufficient time to accomplish big things this year.

The House and Senate must clear a debt ceiling increase and a government spending bill before September ends, perhaps paired together.

Tax reform should unify nearly all Republicans and even attract modest Democratic support. A Thanksgiving deadline, which is aggressive, is also achievable. Making it retroactive will juice the economy this year.

Infrastructure may take more time, but should be pursued after tax reform and should also attract bipartisan support.

The Senate cannot give up on health care reform. A second round, which block grants federal money to states along the lines of Graham-Cassidy, should be considered. Additionally, a September corruption trial for Sen. Bob Menendez, New Jersey Democrat, may give Republicans the additional vote they need if he resigns after a conviction or is removed from office.

Gridlock reform should also be an urgent priority. Federal judicial vacancies are stacking up, and after nearly eight months Mr. Trump has had just seven judges confirmed, with 32 more nominees. In the last two presidencies, a total of 39 circuit and district court nominees were confirmed in the first year. So far, Mr. Trump has had just four. Making matters worse, planned retirements are outpacing confirmations and the vacancy list is growing. To solve this problem, the ‘30-hour rule’ should be scrapped and the ‘blue-slip’ process, in which home state Senators can veto a judicial nominee, should require a response in seven days.

Picking a fight with GOP congressional leaders is self-defeating. The pace of Congress is deeply frustrating. But just imagine how much worse the situation could be with a Democratic House.

The job of president is immensely difficult.

Mr. Trump inherited a deeply divided country and has faced more committed opposition than any president in my lifetime. The learning curve has been steep and he has made significant mistakes.

Can he refocus for the final four months of 2017 and end this year with successes that will give him and the GOP new momentum headed into an election year?

• Matt Mackowiak is the president of Austin, Texas, and Washington, D.C.-based Potomac Strategy Group, a Republican consultant, a Bush administration and Bush-Cheney re-election campaign veteran, and former press secretary to two U.S. senators. His national politics podcast, “Mack on Politics,” is produced in partnership with The Washington Times. His podcast may be found on iTunes, Google Play, Stitcher, and on the web at MackOnPolitics.com.