There is no way to logically determine which square to pick here
I’m afraid there’s no special trick or anything to solve this situation reliably. All the available information is clearly displayed for you, and there’s an equal chance of either square having the mine. Minesweeper simply isn’t designed to be logically solvable 100% of the time. This is why sides and corners are somewhat dangerous, though the situation can happen in other ways, too.
All you can do is guess and hope for the best.