All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
What should be taken into account is the situation of the person when he spoke; if he actually preferred (B) when he said that he preferred (A), then he said something that is contrary to reality. This is the definition of lying.
The fact that this is an opinion that can change does not negate the fact that this is a lie.
If his opinion changes afterwards and he wished to speak, then he should say what is accordance with the truth so that he would be truthful.
Allah knows best.