Generally speaking, if you're closer to an outpost it's yours. There are exceptions to this though. If a neighbor has a lot more troops in the area you may need to yield. I always try to negotiate for outposts as to not waste drillers in the beginning.
I'd recommend to not mine day 1, and to not fight anyone for the first couple days. Early mines make you weaker, make you a target, and also don't put out a lot of neptunium.