Here's the problem & solution from

http://www.chem1.com/acad/webtext/thermeq/TE4.html for easy reference:

**Problem Example 2**One mole of an ideal gas at 300 K is allowed to expand slowly and isothermally to twice its initial volume. Calculate q, w, ?S°sys, ?S°surr, and ?G° for this process.

Solution: Assume that the process occurs slowly enough that the it can be considered to take place reversibly.

a) The work done in a reversible expansion is

so w = (1 mol)(8.314 J mol–1 K–1)(300K)(ln 2) = 1730 J.

b) In order to maintain a constant temperature, an equivalent quantity of heat must be absorbed by the system: q = 1730 J.

c) The entropy change of the system is given by Eq. 10 (Part 2):

?S°sys = R ln (V2/V1) = (8.314 J mol–1 K–1)(ln 2) = 5.76 J mol–1 K–1

d) As was explained in Part 2, the entropy change of the surroundings, formally defined as qrev/T, is

?S°surr = q/T = (–1730 J) / (300 K) = – 5.76 J mol–1 K–1.

e) The free energy change is

?G° = ?H° – T ?S°sys = 0 – (300 K)(5.76 J K–1) = –1730 J

Comment: Recall that for the expansion of an ideal gas, ?H° = 0. Note also that because the expansion is assumed to occur reversibly, the entropy changes in (c) and (d) cancel out, so that ?S°world = 0.