Try this test to confirm if a person is spuriously disagreeable (keep in mind that they target those they don't like but are overly agreeable with those whom they wish to ingratiate themselves). As they're disagreeing with you, subtly change your position to theirs, and watch them seamlessly shift their own position to disagree with themselves. It's a fascinating study in abnormal psychology.
If you feel someone is trying to curry favor with you, do the same test in reverse; it's the same mental illness responsible for both behaviors. You can't test for both opposite behaviors, you'd have to watch that person treat someone else differently.
Another thing to watch out for: they will behave differently depending on whom they think are watching or listening. For example, one such ill person can treat you agreeably when it's one on one, but when a third party is involved, they treat you disagreeably. Another ill person will treat you disagreeably when alone, but agreeably when certain people are in the room.
I don't lose sleep over it, I just find it interesting. There's a word for those that exhibit these behaviors, but I'm suspicious of classifications as psychology is not an exact science. But if pressed, I'd put it in the sociopathic realm.
free to comment below. If it's a serious comment or question, I will
post it here and reply.