You're right to be addressing it now. You don't want to get any sort of water damage or insects in there.
For you to do it personally, it would be difficult. You need all the tools, a power saw, ladders, good skills in woodworking, etc. By the looks of it, that would be a difficult job in a city like Philly. The best thing to do would be to hire a contractor.
On to the cost...I can't give a definite answer. To do things the right way you're going to want to use AZEK, which is a PVC trim that looks and feels like wood. It's a vinyl composite that will never rot and looks absolutely beautiful. You CAN replace the trimming with wood, but you'd have that getting rotted out down the road a few years. Our pine wood rotted in 4-5 years after building a brand new house. I think using AZEK is worth the extra money and will add resale value to the home.
How many windows and door trims are there? Do they go all the way up? Doesn't look like too many. The price of the contractor will be based on how long it takes him to do the job. That job right there looks like it would take no more than 3 days. If you want to save money and you're up for it, painting that trim yourself will save you hundreds of dollars.
Hmm...I'll throw out some numbers, but take them with a grain of salt, because I'm only 20 years old with limited experience. I do have a fair amount of knowledge due to helping my parents out a lot when we built our house.
$2000-$2500 for AZEK materials + labor. If you use regular wood, maybe $1000 less?
$1000-$1200 for materials + labor to paint all of it if you hire someone to paint. Well, you don't absolutely NEED to paint AZEK, but that extra cover of protection helps. Plus caulking and covering the nail holes with a soft white looks fantastic. And if you want the trim to be the same color for the door, that would need to be painted obviously.