Dear Shamala,
First make it clear that Excise duty will be charged on manufacture. In your case A does not manufacture anything. He just taking FG from B & suppling to his customer by adding profit.
However as per deemed manufacture concept relabelling amounts to manufacture subject to same is mentined in Section Notes or chapter notes of CETA.. In your case goods are labeled at B's factory only. So no question of manufacture will arise.
So you have to just pay duty equals to cenvat availed on goods purchse from B. And in respect of profit portion you have to levy VAT only. Same duties will levied though he is manufacturer & not a dealer.