The encounter distance came up as 170 yards (4d6 x 10 yards). A pretty respectable distance but giants are tall and easily seen, plus they would have a good vantage for spotting the party as well.
Stone Giants are Neutral and there's nothing in their description to indicate a natural empathy or antipathy toward people. So a reaction roll is probably in order. Unfortunately, it came up a 4, so the giants are not feeling friendly. The giants can throw stones 300', but that becomes yards in the wilderness, so they would probably lead with that. But rather than get into a specific melee, let's take a look at the encounter and try making sense of it.
The party is travelling through the mountains, yes? It's a random encounter, so they haven't met these giants before. The two groups are nearly two hundred yards apart, so it's not like the PCs could have said something to tick the giants off. What would cause such a hostile reaction? Are the giants being territorial? Did they just wake up grouchy? Or did they just want some target practice?
Maybe it's a case of mistaken identity,
Perhaps the giants had a run in with a different group of puny humans, maybe an NPC party? Giants have good treasure, so maybe, in a "My Cousin Vinny" sort of a twist, some other adventurer types tried to raid the lair for the loot. Maybe they succeeded, maybe they were chased off, but during the fracas all but one of the giants' pet bears was killed! Now the giants (the surviving ones at any rate) are angry. After scouring the mountainside all morning looking for the interlopers -using the bear to try tracking them- what should come stumbling by? A group of murder hobos just strolling along the slopes!
Now this could (likely) end up being a straight out fight to the finish, with neither side knowing the whole story. But imagine for a moment that one of the giants speaks Common and yells something mid-fight like "Now you will pay for what you did!" And the PCs retort with something better than "Huh?"
If the slaughter pauses long enough for a non combat actions to take place, maybe the party passes the bear's sniff test and the giants realize their mistake. Perhaps the giants feel guilty, or maybe they offer the PCs a bounty to hunt down the "killer NPCs." Depending upon the PCs' levels, they might decide staying on the good side of some 9HD monsters isn't the worst idea imaginable.
That sounds like a fun little twist. Or at least a potential side quest. Not to mention that, if they are sloppy in their pursuit, they could make enemies out of the NPCs. Plot fodder for months!