How many such rearrangements are. The 5 letters in the list G, H, I, J, K are to be rearranged so that G is the 3rd letter in the list and  H is not next to G. How many such rearrangements are.
Let there are 5 positions  * * * * * 
We have fixed the  3rd place for G, therefore * * G * * 


*

*1st pace can be rearranged by 4 ways.

*2nd pace can be rearranged by 2 ways.[because H can not be placed there.]

*4th  pace can be rearranged by 1 ways.[because H can not be placed there.]

*5th  pace can be rearranged by 2 ways. 
So the total number of ways are = $4 \times 2 \times 2 =16$ 


But the answer is given 12. 
Where did I do wrong 
 A: The problem with your analysis is that the $4$ ways that the first place can be filled are of two different types. If we fill with an H, then the remaining $3$ slots can be filled in $3!$ ways.
For the other $3$ ways of filling the first place, we must place the H in fifth place. Then the remaining two slots can be filled in $2!$ ways, giving $(3)(2!)$.
Now add the contributions from the two types.
Remark: As has been pointed out elsewhere, it is often more efficient to take care of fussy people like H first. That way, we don't end up with two different types.
If for each of the $a$ ways of carrying out Task 1, there are $b$ ways to carry out Task 2, then Tasks 1 and 2 can be dine in $ab$ ways. But if you cannot use the word "each" then multiplication is not the appropriate tool.
In filling the last place using your method, we certainly do not have $2$ ways to fill fifth place for each of the legal ways of filling the first four places.
A: $G$ is not free, $H$ can only be at $1$ or at $5$, giving $2$ choices. The remaining $3$ letters can be arranged in any way in the remaining $3$ spaces, giving $3!$, thus
$$N = 1 \cdot 2 \cdot 3! = 2\cdot 6 = 12$$
A: Always arrange those entities first which are restricted. This will allow up for filling spaces later on with other entities. In this case, after fixing G in the 3rd place,  fill up H, which clearly can be done in 2 ways (1st and last position)
Thus, for H, we have 2 ways. Then there are no restrictions left. We have 3 places left and 3 letters, and we can arrange the remaining letters in 3! ways (permuting 3 objects).
Thus total number of ways is = 2 * 3! = (2 * 6) = 12
You may have different cases: if you are placing H at first position, then 4th and 2nd are not restricted. But you are handling it all at once. The fallacy in your argument is suppose H is in the first position (because you have done it in 4 possible ways), then 2nd position will have of a choice of 3, and 4th will have a choice of 2.
Same for when H is in the last position.
A: Yet another way to think about it:
You'll ram $G$ into the middle at the end, so just arrange the four remaining letters in $4!$ (or 24) ways. 
In all of these arrangements, H is paired with another letter either before or after the $G$ slot. 
In exactly half of these arrangements, the $H$ is adjacent to the $G$, so the acceptable arrangements number half of $24$, or $12$
