This is a total opportunity for Metro. Clear immigration and customs quickly using GE and getting bags quickly-ish (Business class). Take Silver Line from IAD to Rosslyn, change to Blue Line in Rosslyn (in the direction of Franconia Springfield) and just a few stops to DCA. Even if you took two hours at IAD to get out of immigration and customs, you'd still have from 5:35 pm until 7:35 pm to get between IAD and DCA on Metro - which is enough time.
And, yes, you'd have to re-claim luggage at IAD and bring it with you to re-check at DCA. At DCA there's pre-check for GE folks.
I would totally do this. Indeed, pre-Metro, I've done it under more dire circumstances (bad wx, rush hour) with far less time in cabs (Washington Flyer) and thought "gee, Metro would make this so much easier..." (Admittedly, from a Metro rider, that's a hillario statement, but ppl will get the point).