Both these graphs will pass through the origin so you need to work out the difference in areas by integrating
INtegral k cos x (between the limits 0 and a) - Intgral kx^2 ( between 0 and a) = 2
Find k
(where a is the value of x on positive side of the graph where the 2 curves intersect)