There is no question of NOC in this case because when you applied for job B, you were not in Government service.
After joining job A, you have now got the offer for job B and you want to join job B. So, what you have to do now? You have to give a representation to the Head of Office (job A) stating every fact and apply for 'Technical Resignation' for joining job B.
As an officer dealing with Establishment matters in Central Government offices in different positions for a very long time, I know that in such cases, the Government office doesn't create any problem.
Your Technical Reignation will be accepted and you will be able to join job B very easily. The exception only happens if there is any vigilance case or any disciplinary case is pending or is being contemplated against the candidate in the present Government office (in your case, in job A).
Kabhi un mad-bhari ankhon se piya tha ek jaam, aajtak hosh nehi, hosh nehi, hosh nehi—Jigar Moradabadi ("Once I drank a cup from those drunken eyes; till now I haven't regained my senses!")