Sadly, people and relationships cannot be reduced to mere equations. As Dostoyevsky points out in Notes from Underground, if we did come up with an equation proving that people always behave in their best interest, people would do the opposite just to prove their free will.
(I know what you’re thinking. In that case, we can say that people will do the opposite of what’s in their best interest because the equation says so. But then people might contradict that prediction, and you’d be left saying that people will either do what’s in their best interest or not, depending on whether they’d rather stick it to you or just get on with life. And then you’d need an equation to predict who would do what, and we’d be right back where we started.)