Assuming it is a taxable (i.e. non-retirement) account, a sale of securities is a sale of securities, regardless of whether the proceeds are moved to another institution and reinvested or taken out for other use.
Remember, it is the GAIN on which you will be taxed. The PROCEEDS number needs to be reported, as does your COST BASIS, but it is the GAIN (or LOSS) from the transactions at "A" that will impact your taxes.
Side note: Financial institution "B" should have warned you of the taxable nature of the sale transactions. Alternatively, a direct transfer of securities via the ACAT system might have avoided any transactions, assuming your original holdings were transferrable.