Chern character of Hom-sheaves

I'm reading the book about moduli spaces by Huybrechts and Lehn, and i'm stuck understanding a proof, it is Theorem 6.1.8.:

Given a K3-surface $X$ and a 2-dimensional space $M$, coherent and torsion free sheafs $F$ on $X$ and $E$ on $M\times X$. We have projections $p,q$ from $M\times X$ to $M$ and $X$ resp.

They claim the class $a:=ch(p_{\*}\mathcal{H}om(q^{\*}F,E))$ as an element in $H^{\*}(M,\mathbb{Q})$, where $p_{\*}\mathcal{H}om(q^{\*}F,E)=\sum\limits_{i=0}^2 (-1)^i \mathcal{E}xt^i_p(q^{\*}F,E)$, only depends on the classes of $ch(q^{\*}F)$ and $ch(E)$ as elements in $H^{\*}(M\times X,\mathbb{Q})$, where $\mathcal{E}xt_p^i(q^{\*}F,E)=R^i(p_{\*}\mathcal{H}om(q^{\*}F,E))$.

So using Grothendieck-Riemann-Roch as suggested shows: $ch(\sum\limits_{i=0}^2 (-1)^i \mathcal{E}xt^i_p(q^{\*}F,E))td(M)=p_{\*}(ch(\mathcal{H}om(q^{\*}F,E)td(M\times X))$

Here i am stuck. Why does this show that $a$ only depends on $ch(E)$ and $ch(q^{\*}F)$. I think one has to show that $ch(\mathcal{H}om(q^{\*}F,E))$ only depends on this classes, but i can't see why.

-
I don't have Huybrechts-Lehn in front of me, but it seems from what your are saying that $\mathcal{H}om(-,-)$ really means the class of $mathbb{R}\mathcal{H}om(-,-)$ in the Grothendieck group. So that resolving the first entry by vector bundles is the right thing to do. –  Donu Arapura Oct 31 '10 at 15:32
That should read $\mathbb{R}\mathcal{H}om(-,-)$ –  Donu Arapura Oct 31 '10 at 15:33
When you post a question on a specific proof in a specific textbook, please indicate which proof you are talking about (e.g. give a page number). That way, others could see if you have omitted some assumptions, or misunderstood s.th. that's not apparent from your question alone. –  Arend Bayer Oct 31 '10 at 15:35
You are right AByer. I changed the question to show where i'm stuck and added the Theorem number. –  TonyS Oct 31 '10 at 16:35

If you apply ${\mathcal H}om(-,E)$ to a resolution of a sheaf $G$, you obtain a complex, the cohomology of which are ${\mathcal E}xt^i(G,E)$, hence by additivity of the Chern character, the alternating sum of Chern characters of the terms of the complex equals the alternating sum of Chern characters of the Ext sheaves.

-
Yes, i see that. But the class i'm looking at, there are the relative Ext-sheaves, i.e. $\mathcal{E}xt_p^i(M,N)$ which are the right derived functors of $p_{\*}\mathcal{H}om(M,N)$, where $p$ is the projection mentioned in my question. –  TonyS Oct 31 '10 at 15:54
All the same, if you apply the functor $Rp_*\circ R{\mathcal H}om(-,E)$ to a resolution, you obtain a complex, the cohomology of which are ${\mathcal E}xt^i_p(G,E)$. –  Sasha Oct 31 '10 at 15:59
But why does this show that the classes only depend on the two given one? I changed my question to make it clearer where i'm stuck. –  TonyS Oct 31 '10 at 16:34

This was to long for a comment, so i post this as an answer: Using Sasha's answer i tried my best, and here are my computations. Feel free to report any mistakes.

Take a locally free resolution $G_{\*} \rightarrow q^{\*}F$. Then we have $\mathcal{E}xt_p^i(q^{\*}F,E)=h^i(\mathcal{H}om_p(G_{\*},E))$, where $h^i = ker(d_i)/im(d_{i-1})$. Now:

$ch(\sum\limits_{i=0}^2(-1)^i \mathcal{E}xt_p^i(q^{\*}F,E))=ch(\sum\limits_{i=0}^2 (-1)^i h^i(\mathcal{H}om_p(G_{\*},E)))$ $= ch(ker(d_0))-ch(ker(d_1)/im(d_0))+ch(coker(d_1))$ $=ch(ker(d_0))+ch(im(d_0))-ch(ker(d_1))-ch(im(d_1))+ch(\mathcal{H}om_p(G_2,E))$ $ch(ker(d_0)\oplus im(d_0))-ch(ker(d_1)\oplus im(d_1))+ch(\mathcal{H}om_p(G_2,E))$ $ch(\mathcal{H}om_p(G_0,E))-ch(\mathcal{H}om_p(G_1,E))+ch(\mathcal{H}om_p(G_2,E))$ (1)

Now one uses Grothendieck-Riemann-Roch:

$ch(\mathcal{H}om_p(G_i,E))=ch(p_{\*}\mathcal{H}om(G_i,E))=p_{\*}(ch(\mathcal{H}om(G_i,E))td(X))$

Now the $G_i$ are locally free, so $ch(\mathcal{H}om(G_i,E))=ch(G_i^{\*})ch(E)$ and (1) gives:

$p_{\*}(ch(G_0^{\*})ch(E)td(X))-p_{\*}(ch(G_1^{\*})ch(E)td(X))+p_{\*}(ch(G_2^{\*})ch(E)td(X))$

which is $p_{\*}((\sum\limits_{i=0}^2 (-1)^i ch(G_i^{\*}))ch(E)td(X))$, but since $G_{\*}$ was a resolution of $q^{\*}F$ this is

$p_{\*}(ch((q^{\*}F)^{\*})ch(E)td(X))$

So we have: $ch(\sum\limits_{i=0}^2(-1)^i \mathcal{E}xt_p^i(q^{\*}F,E))=p_{\*}(ch((q^{\*}F)^{\*})ch(E)td(X))$

So i think my assumption, that $ch(\mathcal{H}om(M,N))=ch(M^{\*})ch(N)$ is always true, is wrong?

-