TITLE: Are those two ways to relate Extensions to Ext equivalent?
QUESTION [11 upvotes]: Given an extension of $R$-modules $0\to B\to X\to A \to 0$, one usually associates $x\in\operatorname{Ext}^1(A,B)$ to this extension by taking the long exact sequence 
$$\dotsb\to \operatorname{Hom}(A,X) \to \operatorname{Hom}(A,A) \xrightarrow{\partial} \operatorname{Ext}^1(A,B)\to \dotsb$$
and setting $x=\partial(\mathrm{id}_A)$. Alternatively one could apply $\operatorname{Ext}^{*}(-,B)$ to get 
$$\dotsb\to \operatorname{Hom}(X,B) \to \operatorname{Hom}(B,B) \xrightarrow{\partial} \operatorname{Ext}^1(A,B)\to \dotsb$$
and take $y=\partial(\mathrm{id}_B)$. Do we get the same elements in this way? I.e. is $x=y$? Optimally, can you show this from the standard properties of $\operatorname{Ext}$? I became interested in this because it seems to be necessary to solve a more particular question about a proof I had.

REPLY [6 votes]: We can compute this in the derived category.
Extensions give distinguished triangles, and are determined by the corresponding morphism $f : A \to B[1]$.
The two methods you describe for associating an element to the extension correspond to pre- and post-composition with $f$:
$$ \hom(A, A) \xrightarrow{g \mapsto f\circ g} \hom(A, B[1]) $$
   $$ \hom(B[1], B[1]) \xrightarrow{h \mapsto h\circ f} \hom(A, B[1]) $$
and so the same element $f \in \hom(A, B[1])$ is indeed obtained by applying these maps to the respective identity morphisms.