I was not telling you to do the same thing twice, You presented two problems:
The first used a sample of Esomeprazole magnesium dihydrate;
The second used a sample of Esomeprazole magnesium dihydrate which had been dried (effectively removing the water content).
Let me try and clarify this once again:
For the first problem, you have Esomeprazole magnesium dihydrate and an "as is" potency value: When applied,this potecy will give you the Esomeprazole magnesium concentration as the "as is" potency will account for the water content and any impurities in the Esomeprazole magnesium.
From molecular weight data, you can calculate the percentage of Esomeprazole in Esomeprazole magnesium. Applying this value will enable you to calculate the amount of "pure" Esomeprazole in your
original Esomeprazole magnesium dihydrate sample.
In the second problen, you have taken Esomeprazole magnesium dihydrate which has been "dried" (effectively removing the water content).this leaves you with Esomeprazole magnesium and any impurities in the material. In this case, the "as is" potency is of no use to you and you will now need to find a purity value for the Esomeprazole magnesium which does not include the water content. I would normally use a purity value (determined by HPLC or UV, etc.) which should be present on the certificate of analysis. Once this value is applied you have a "pure" Esomeprazole magnesium concentration. From the mw data you can then caclulate "pure" Esomeprazole content in the sample.