I asked this very basic question about Grothendieck Duality on the Stack--exchange some time ago, without any replies.
I'm therefore asking the question here to test my luck.
Let $f:X\to Y$ be a morphism of schemes such that $f^!$ exists. Let $A'$ be in the derived category of Quasi--coherent sheaves on $\mathcal{S}(Y)$$Y$, which I will denote $Qco(Y)$, and $A$ be in the derived category of $\mathcal{S}(X)$$Qco(X)$. Grothendieck duality assures a bijection of sets
$$\textbf{Hom}(A,f^!A')\to \textbf{Hom}(Rf_*A,A')$$
Here $\textbf{Hom}$ is the set of Homomorphisms between objects in the derived category, we also have $H^0\textbf{RHom}=\textbf{Hom}$. I am wondering if the following natural morphism in the derived category of $\mathcal{S}(Y)$$Qco(Y)$ is an isomorphism?
Let $A,B\in \mathcal{S}(X)$$A,B\in Qco(X)$. Since $Rf_*$ is a functor from the derived category of $\mathcal{S}(X)$$Qco(X)$ to the derived category of $\mathcal{S}(Y)$$Qco(Y)$ there is an induced morphism
$Rf_*(\textbf{Hom}(A,B))\to \textbf{Hom}(Rf_*A,Rf_*B)$. Now if we let $B=f^!A'$ for some $A'$ in the derived category of $\mathcal{S}(Y)$$Qco(Y)$ the Grothendieck trace map induces a morphism $$\textbf{Hom}(Rf_*A,Rf_*f^!A')\to \textbf{Hom}(Rf_*A,A')$$
Is this composition an isomorphism?
I.e., is $$Rf_*(\textbf{Hom}(A,f^!A'))\to \textbf{Hom}(Rf_*A,A')$$ an isomorphism?
By Grothendieck duality $$Rf_*\textbf{RHom}(A,f^!A')\to \textbf{RHom}(Rf_*A,A')$$ is an isomorphism but if we apply $H^0$ to this we get
$$H^0Rf_*\textbf{RHom}(A,f^!A')\to \textbf{Hom}(Rf_*A,A')$$
Which seems pretty far from what I wanted unless if $f_*$ is exact.
Thank you for any input!
$\textbf{Hom}$ denotes in this question Homomorphisms between complexes (of Quasi--coherent sheaves) in the derived category, and $\textbf{RHom}$ denotes the right--derived functor of sheaf $\textbf{Hom}$. (I.e., no global section functor is present in this question, this is just to clarify and avoid confusion)