How To get Address Public Key from Account XPUB?
To go from account xpub to address, you must first derive an xpub at the External index (0) or Internal index (1), then derive another xpub from the External/Internal xpub. Take the public key from the resulting xpub and this is the public key used for the address.
For a detailed explanation of extended public keys and how to derive child public keys, take a look at the BIP32 documentation. For a not-as-in-depth breakdown of deriving addresses from an extended public key (which is exactly what you're trying to do), I have written this writeup.