There can certainly be cases in shounen manga in which a character really shouldn't have access to the information needed to make a power statement (hence bad writing), but there are others in which it's reasonable to surmise that they were just told something off-screen. For example, Trunks...