Dear @Liam,
Yes, detergents are very good at inactivating hepatitis B (see discussion in other threads: Inactivating Hep B), so washing in soapy water will inactivate the vast majority of the small amount of Hep B (if any) that has inadvertently been left on the cup. Thus, the risk of transmission through this method is very low.
Thomas