Calculate center from the given point B