Establish a natural isomorphism between $\text{Nat}(K, D(a, -)) \cong \text{Nat}(a,Q)$. From Mac Lane's Category Theory:


I'm trying to show the above, but I'm having trouble with a specific step.
If $\tau : \text{Nat}(K, D(a,-)) \rightarrow \text{Nat}(a, Q)$ is the bijection defined by $\alpha : K \rightarrow D(a, -) \mapsto \beta : a \rightarrow Q$, 
I know I have to show $$(1)\space\space\space\space\space\text{Nat}(a, Qf) \circ \tau_d = \tau _{d'} \circ \text{Nat}(Kf, D(a,d))$$ for $f : d \rightarrow d'$.
The left side of $(1)$ is simply $\alpha_d \mapsto \beta_d \mapsto f \circ \beta_d$, but I'm having trouble with the right side.
I see that it would have to be a map with $Kd' \rightarrow^? Kd \rightarrow^{\alpha_d} D(a,d) \rightarrow^{D(a,f)} D(a, d')$, but I can't think of a way to fill the $?$ and complete the diagram.
Anyone have any ideas?
 A: You are on the right track, except that you need to prove naturality in $a$, not $b$. 
Let's first make sense of the left hand side of:
$$\text{Nat}(K, D(a,-)) \cong \text{Nat}(a, Q)$$
Let's pick a natural transformation, $\alpha$ from $K$ to $D(a,-)$. Let's select its component at some $b$:
$$ \alpha_b : Kb \to D(a, b)$$
This is a function in $Set$, so let's pick its component at some $x \in Kb$. It should be a morphism in $D$ from $a$ to $b$. Let's call it $f$.
Now let's look at the right hand side. Here we have natural transformations between functors that go from the category of elements to $D$. An object in the category of elements is a pair: object in $D$, let's call it $b$; and an element of $Kb$, let's call it $x$ (you see where I'm going with this). We are looking for a component of a natural transformation $\beta$ at $(b, x)$. It's a morphism from $a(b,x)$ (which is just $a$) to $Q(b, x)$ (which is just $b$). So it's a morphism from $a$ to $b$. We can just use our $f$. This works in both directions, so it establishes a bijection $\tau$.
What remains is to prove that $\tau$ is natural in $a$. 
Both sides are contravariant functors in $a$. Let's pick a morphism $g : a' \to a$ and lift it using those functors. The first functor should lift it to a function:
$$\text{Nat}(K, D(a, -)) \to \text{Nat}(K, D(a', -)$$
In components, we need to define a morphism $f' : a' \to b$ in terms of $f : a \to b$. Which is just precomposition:
$$f' = f \circ g$$
The second functor must lift $g$ to:
$$\text{Nat}(a, Q) \to \text{Nat}(a', Q)$$
which, again, in components, can be done by precomposition. The rest is pretty straightforward.
