B will invalidate A's patent with the indian patent as prior art because a priority claim can be made only for 12 months so the US application can't claim priority to the indian application and therefore has 2005 as the filing date.
B could also invalidate A's patent by proving that they had the product in public use prior to the filing date of the patent.
B could claim a "prior use" exception and not pay royalties (pre AIA that's pretty much theoretical).
Other than that, a valid patent can claim royalties for the time between publishing of the application and grant under some circumstances. See for example here:
This provisional right comes with two
caveat [...]
The invention as claimed in the
patent must be “substantially identical” to
the patent as claimed in the published patent
application. 35 U.S.C. § 154(d)(2) [...]
The second caveat concerns notice. The
statute requires the infringer to have
“actual notice” of the published
application. 35 U.S.C. § 154(d)(1)(B). [...]
Commentators agree that based on
congressional intent, the courts will
likely require notice from the applicant.
See, e.g., 82
JPTOS at 748; Patrick J.
Birde, Nicholas J. Nowak,
Analyzing
Provisional Rights for Patent Applicants, 9
No. 12 Intell. Prop. Strategist 1 (2003);
Terence P. Ross,
Intelectual Property
Law: Damages and
Remedies §
3.08
(2004); Brian J. Massey,
Reasonable
Royalties for 18 Month Patent Publication
Infringement:
An Unreasonable Remedy for
Smal Businesses,
8 J. Small & Emerging
Bus. L. 87, 103 (2004).
-> If B infringed only while the patent was still an application (but not before filing), A won't be able to enforce royalties or punishment as high/strong as if B infringed afterwards, but will be able to enforce royalties nonetheless.
Therefore, if B stops production before the grant, they will still "be punished" (with royalties) but that should be less than if they infringed a granted patent.