(solution) Can someone please help to derive the variance equation in the

(solution) Can someone please help to derive the variance equation in the

Can someone please help to derive the variance equation in the equation attachment with respect to k.  I am supposed to minimize portfolio variance with respect to return =k.  I want the steps written out in variable form so that the answer is k= such and such variables in the end. I just want to see how someone does the calculus behind the equation step by step so that I can follow and then plug in the numbers myself. If I see how someone else solves it, I think i can apply it to problems later on. Thank you!

I am trying to learn this to solve question 1b on homework 1.