Proof of Serre Duality in Hartshorne I'm currently reading Hartshorne, Algebraic Geometry, Chapter III.7 The Serre Duality Theorem.
I'm stuck at Corollary 7.7: If $X$ is a projective Cohen-Macaulay scheme of equidimension $n$ over $k$. Then for any locally free sheaf $\mathcal{F}$on X there are natural isomorphisms $H^i(X, \mathcal{F}) \cong H^{n-i}(X, \mathcal{F}^{\vee}\otimes \omega_X^\circ)'$
Now his "Proof" is just

Use $(6.3)$ and $(6.7)$.

Trying this I get the following:


*

*$H^i(X, \mathcal{F}) \cong \text{Ext}^i(\mathcal{O}_X, \mathcal{F})$ by $(6.3)$

*$H^{n-i}(X, \mathcal{F}^\vee \otimes \omega_X^\circ)' \cong \text{Ext}^i(\mathcal{F}^\vee \otimes \omega_X^\circ, \omega_X^\circ)$ by Theorem $7.6$

*$\text{Ext}^i(\mathcal{F}^\vee \otimes \omega_X^\circ, \omega_X^\circ) \cong \text{Ext}^i(\omega_X^\circ, \mathcal{F} \otimes \omega_X^\circ)$ by $(6.7)$


But how do I know conclude, that the first and the last term are the same?

So it seems I got it backwards: If you start with applying Thm 7.6 to $H^i(X, \mathcal{F})$ you get:
$$H^i(X, \mathcal{F}) = Ext^{n-i}(\mathcal{F}, \omega_X^\circ)' = Ext^{n-i}(\mathcal{O}_X, \mathcal{F}^\vee \otimes \omega_X^\circ)' \cong H^{n-i}(\mathcal{F}^\vee \otimes \omega_X^\circ)'$$
