The bank may buy through the first Salam at one advance price and sell through the second Salam at another price. The difference may become commercial profit.
But that profit is not protected by making the contracts dependent. If the first seller defaults, the bank still carries the cost and risk of fulfilling the second contract.