With the 2014 NEC addendum, your idea looks to be legal. Here's the relevant 2011 code for ground retrofits with 2014 addendum courtesy ThreePhaseEel.
250.130 Equipment Grounding Conductor Connections. Equipment grounding conductor connections at the source of separately derived systems
shall be made in accordance with 250.30(A)(1). Equipment grounding
conductor con- nections at service equipment shall be made as
indicated in 250.130(A) or (B). For replacement of non-grounding-type
receptacles with grounding-type receptacles and for branch- circuit
extensions only in existing installations that do not have an
equipment grounding conductor in the branch circuit, connections shall
be permitted as indicated in 250.130(C).
...
(C) Nongrounding Receptacle
Replacement or Branch Circuit Extensions. The equipment grounding
conductor of a grounding-type receptacle or a branch-circuit extension
shall be permitted to be connected to any of the following:
(1) Any accessible point on the grounding electrode system as described in 250.50
(2) Any accessible point on the grounding electrode conductor
(3) The equipment grounding terminal bar within the enclosure where the branch circuit for the receptacle or branch circuit originates
(4) For grounded systems, the grounded service conductor within the service equipment enclosure
(5) For ungrounded systems, the grounding terminal bar within the service equipment enclosure
ThreePhaseEel reports NEC 2014 adds the following between 3 and 4: (4) An equipment grounding conductor that is part of another branch circuit that originates from the enclosure where the branch circuit for the receptacle or branch circuit originates
Thank you ThreePhaseEel. The 2014 addendum specifically allows grabbing a ground from any circuit fed by the same sub-panel. Interestingly, nothing about conductor size, but keep in mind the context is ground retrofits only.
If you are going to another outlet on the same circuit (i.e. also turns off when you flip off the breaker) it's already allowed - daisy-chaining like that is the normal way to wire outlet strings.
Where to attach this ground wire? If you're wiring it to an adjacent outlet, just use wire-nut (commonly a yellow one) to tie it in with the ground wires already there.
If you're going into a service panel, tie it into the bus-bar which has all the other ground wires. Here's a picture of a panel with two bus-bars. Sometimes there is one bus bar. Sometimes they carefully separate grounds from neutrals. Other times they don't, depending on the rules. Just Do what you see in your panel.

Those are all single breakers, you might have a tandem aka duplex, which crams 2 breakers into one space.
Generally, adding a ground wire is always better for electronic equipment. It helps surge suppressors do their job by providing a ground reference. It provides real chassis grounding which among other things gives a solid route for static electricity to go to ground instead of getting inside equipment. It also provides a fault path if any hot wires short to ground, which assures you get a breaker trip. And it makes sure equipment chassis is not energized so it electrocutes someone. I'm glad you're doing it - it will help.
That said, grounds will not cause cheap electronics with poor components to suddenly become quality. Grounds will not themselves "clean up" dirty, noisy AC power, although they will help surge suppressors do that. Dirty power is often caused by your own equipment - for instance the air conditioner in your drawing. You may want to protect the PC from the air conditioner.
Grounds also don't fix potential overloads, and you might have one here. Fancy PC's aren't necessarily power hogs (the Mac Pro is only 2.5 amps) but "850 watt" PC power supplies are popular and they can draw 10 amps full bore (the difference being inefficiency). A typical window air conditioner is 5-8 amps. Loads which are continuous should only run at 80% of circuit capacity, that's 12A on a 15A breaker and 16A on a 20A breaker. I would encourage you to investigate further to make sure those loads (and the other loads on that circuit) aren't too much. To measure a device's actual current draw, gadgets like the Kill-A-Watt do nicely.