The number of blocks traveled on the way to the post office was 5 + 20 = <<5+20=25>>25.
Pete traveled 25 × 2 = <<25*2=50>>50 blocks in all.
#### 50