When an attribute ‘x’ determines a prime attribute ‘B’ you can actually replace that prime attribute ‘B’ in any Candidate Key ($AB$) it is in with ‘$x$’ (CK will be $Ax$).
Think about it,
‘$x$’ will ultimately determine ‘$B$’, thus making ‘$Ax$’ also a candidate key.