OE
When the 5 letters are rearranged, G is to be listed in the 3rd position and H cannot be next to G, so there are only two possible positions for H: 1st and 5th.
Case 1: In the rearranged list, G is in the 3rd position, H is in the 1st position, and each of the remaining 3 letters can be in any of the remaining 3 positions. The number of ways these remaining 3 letters can be arranged is 3!, or 6. Thus the total number of rearrangements in case 1 is 6.
Case 2: In the rearranged list, G is in the 3rd position, H is in the 5th position, and each of the remaining 3 letters can be in any of the remaining 3 positions. Thus, as in case 1, the total number of rearrangements in case 2 is 6.
Thus there are 6 + 6, or 12, possible rearrangements, and the correct answer is Choice D.