DFT product of sinusoids
Actually you have quite done it, but lets indicate. 

When the frequencies of both sinusoidal signals $x_1[n]$ and $x_2[n]$ are the same; i.e., $k_1 = k_2 = m$, then the impulses in the corresponding N-point DFT sequences $X_1[k]$ and $X_2[k]$ will occur at the same index $k=m$ and $k=-m$ (or $N-m$) with a weight of $N/2$.

Hence multiplication of $X_1[k]$ with $X_2[k]$  will be $N/2 * N/2 + N/2 * N/2 = N^2/2$, as there are two impulses in the DFT of a cosine signal...

Finally dividing by $N$ yields the result as $N/2$ when the frequencies are the same and $0$ when not.