Showing that composition can be represented by a map I want to prove proposition 5.6 in Lawvere and Rosebrugh.
The proposition goes like this.
Suppose $g:B \to Y_1$ and $\phi: Y_1 \to Y_2$ are arbitrary. 
There exists a $\ulcorner c \urcorner: Y_2^{Y_1} \times Y_1^B \rightarrow Y_2^B$, such that $\ulcorner c\urcorner (\ulcorner \phi \urcorner,\ulcorner g \urcorner) = \ulcorner \phi g \urcorner$.
Now to start define $c: Y_2^{Y_1} \times Y_1^B \times B \to Y_2^B$ as the composite of $1 \times \text{eval}_1: Y_2^{Y_1} \times Y_1^B \times B \to Y_2^{Y_1} \times Y_1$ and $\text{eval}_2: Y_2^{Y_1} \times Y_1 \to Y_2$, where $1: Y_2^{Y_1} \rightarrow Y_2^{Y_1}$ is the identity. Then I wan't to invoke the universal property of one of the exponentials, in order to get $\ulcorner c \urcorner$ and then prove the equality in question, but I can't find the right one to use.
 A: Since I don't know the book and since I can only guess what the notation is supposed to mean, I'll assume that this takes place in a cartesian closed category with terminal object $1$. If I interpret the question correctly, what we're trying to prove is the existence of the so-called internal composition. That is, the morphism $c\colon Y_2^{Y_1}\times Y_1^{B}\to Y_2^{B}$ which makes the diagram
$$\require{AMScd}
\begin{CD}
Y_2^{Y_1}\times Y_1^{B}\times B @>{c\times \mathrm{id}_B}>> Y_2^{B}\times B\\
@V{\mathrm{id}\times\mathrm{ev}_{B,Y_1}}VV @VV{\mathrm{ev}_{B,Y_2}}V \\
Y_2^{Y_1}\times Y_1 @>{\mathrm{ev}_{Y_1,Y_2}}>> Y_2
\end{CD}$$
commute.
Since the adjunction map $\mathrm{hom}(Y_2^{Y_1}\times Y_1^{B},Y_2^{B})\to \mathrm{hom}(Y_2^{Y_1}\times Y_1^{B}\times B,Y_2)$ maps an arbitrary morphism $f\colon Y_2^{Y_1}\times Y_1^{B}\to Y_2^{B}$ to the composition
$$Y_2^{Y_1}\times Y_1^{B}\times B\xrightarrow{f\times\mathrm{id}_B}Y_2^{B}\times B\xrightarrow{\mathrm{ev}_{B,Y_2}}Y_2,$$
we see that $c$ is just the unique element corresponding to $\mathrm{ev}_{Y_1,Y_2}\circ(\mathrm{id}_{Y_2^{Y_1}}\times\mathrm{ev}_{B,Y_1})$.
Finally, precompose the diagram with $1\times 1\times B\xrightarrow{([\phi],[g])\times\mathrm{id}_B}Y_2^{Y_1}\times Y_1^B\times B$ and combine all the present adjunctions to conclude that $c([\phi],[g]) = [\phi\circ g]$.
Addendum: After having a look at the book in question and reading the question again, I realised that the above is not much more than the OP already knew. Here we go again, but using different words.
The universal (exponential) property of $Y^B\times B\xrightarrow{\mathrm{ev}_{B,Y}}Y$ is this: For every $X$ and each map $f\colon X\times B\to Y$ there exists a unique $[f]\colon X\to Y^B$ such that the composition
$$X\times B\xrightarrow{[f]\times\mathrm{id}_B}Y^B\times B\xrightarrow{\mathrm{ev}_{B,Y}}Y$$
equals $f$.
I'd rather conflict with the OP's notation than with mine above. Therefore, we define $f := \mathrm{ev}_{Y_1,Y_2}\circ(\mathrm{id}_{Y_2^{Y_1}}\times\mathrm{ev}_{B,Y_1})\colon Y_2^{Y_1}\times Y_1^{B}\times B\to Y_2$ and from the exponential property (where $X = Y_2^{Y_1}\times Y_1^{B}$ and $Y = Y_2$) we get $c := [f]$, the unique map $c\colon Y_2^{Y_1}\times Y_1^{B}\to Y_2^{B}$ making the above square diagram commute.
It remains to show that $c([h],[g]) = [h\circ g]$ for every pair of maps $g\colon B\to Y_1$ and $h\colon Y_1\to Y_2$ where $[g]\colon 1\to Y_1^B$ and $[h]\colon 1\to Y_2^{Y_1}$ are the unique maps such that
$$B \xrightarrow{[g]\times \mathrm{id}_B}Y_1^B\times B\xrightarrow{\mathrm{ev}_{B,Y_1}}Y_1$$
equals $g$ and
$${Y_1} \xrightarrow{[h]\times\mathrm{id}_{Y_1}} Y_2^{Y_1}\times Y_1\xrightarrow{\mathrm{ev}_{{Y_1},Y_2}}Y_2$$
equals $h$. Thus, $h\circ g\colon B\to Y_2$ equals
$$
B\to 1\times 1\times B
\xrightarrow{1\times [g]\times \mathrm{id}_B}1\times Y_1^B\times B
\xrightarrow{1\times \mathrm{ev}_{B,Y_1}}1\times Y_1
\xrightarrow{[h]\times \mathrm{id}_{Y_1}}Y_2^{Y_1}\times Y_1\xrightarrow{\mathrm{ev}_{{Y_1},Y_2}}Y_2
$$
and substituting identities gives
\begin{align*}
h\circ g &= (B\to  1\times 1\times B
\xrightarrow{[h]\times [g]\times \mathrm{id}_B}Y_2^{Y_1}\times Y_1^B\times B
\xrightarrow{\mathrm{id}_{Y_2^{Y_1}}\times \mathrm{ev}_{B,Y_1}}Y_2^{Y_1}\times Y_1
\xrightarrow{\mathrm{ev}_{{Y_1},Y_2}}Y_2)
\\&=
(B\to  1\times 1\times B
\xrightarrow{[h]\times [g]\times \mathrm{id}_B}Y_2^{Y_1}\times Y_1^B\times B
\xrightarrow{c\times\mathrm{id}_B}Y_2^{B}\times B
\xrightarrow{\mathrm{ev}_{B,Y_2}}Y_2)
\\&=
(B\to 1\times B
\xrightarrow{c([h]\times [g])\times \mathrm{id}_B}Y_2^{B}\times B
\xrightarrow{\mathrm{ev}_{B,Y_2}}Y_2).
\end{align*}
But this implies $c([h], [g]) = [h\circ g]$.
