Boss/Boss relationship

I have two bosses, one I report to locally, and one who I really report to in another state. the one in the other state has the ability to fire me for not meeting expectations, the one locally has the ability to make the other one think I am not meeting expectations. they don’t see eye-to-eye, so I am constantly politicking to make my work-life manageable. I am trying to keep this short and sweet so I hope this gives you and idea of what I am struggling with. the bottom line is I have to bosses, neither or which are true leaders; both, in my opinion, somewhat low on the EQ. my emotions are all over the place. I am having a hard time settling in on a thought that will lead to the results I want (happy, productive work life with collaborative relationships). It feels like so much is out of my control. here is my UM:
C- work relationships
T- strained (not adult > adult)
A- manipulate the relationship to “stay alive”
R- fear of losing job, constant stress

C- Work relationships
T- ?
F- confident, safe
A- manage relationship Adult > Adult (
R- Productive, satisfying work life