Derivation of the transfer function of a instrumentation amplifier
One quick assumption I believe one needs to make in order to get that results is that R4=R2 and R3=R1.  It's probably a good bet that R5=R6, so I'll add in that simplifying assumption.

The analysis is simplified by using an ideal op amp rule of thumb:  When connected in a negative feedback configuration, the op amp will do everything in its power to keep the negative input at the same voltage as the positive input.

Going back to the first schematic, the gain from V2 with the positive input grounded will be -R4/R3 (which, given the above assumptions, is the same as -R2/R1).  This is the same gain that the second circuit sees from V21 to the output.

If we ground V21 and modulate V11, the positive input sees a voltage Vpos of V11*R2/(R2+R1).  The output will be doing its best to keep the negative input equal to that, meaning Vneg=Vpos.  Vout needs to pull that voltage divider enough to accomplish that, so:

Vout = Vpos * (R2+R1)/R1 = V11 * R2/(R2+R1) * (R2+R1)/R1 = V11 * R2/R1

Combining these two formulae gives

Vout = -V21 * R2/R1 + V11 * R2/R1 = R2/R1 ( V11 - V21 )

Since that's the part you had a question about, I'll leave setting the gain resistor for a different question.