For detailed and comprehensive network diagram please refer to the picture below LOL:

Provider A is used as a primary provider and this is where default route points to. 1.2.3/24 network belongs to Provider A and is leased by Site X.

Provider B is used as a secondary provider and only few networks being routed through this link on a peering basis. This networks are local and Provider B is advertising 1.2.3/24 network to local peers only. 5.6.7/24 network belongs to Provider B.

There is no NAT translation happening so far but only routing.

What are we trying to achieve?

Basically, Site X wants to route 8.9.10/24 network through Provider B. Since 8.9.10/24 network is not a peer of Provider B and Provider A doesn’t allow to do public announce (aka BGP) routing of 8.9.10/24 through 5.6.7.8 will not work. Moreover, Site X only wants http and https traffic to be routed through Provider B.

Here we go with NAT implementation! http and https traffic would be NATed through Provider B, so the source part would be translated to 5.6.7.8: