2 times the integral from a to x of f(t)dt = 2sinx - 1

(sorry i dont know how to make it look nice)

well the first thing i did was divide by 2, then take the derivative of each side:

f(x) - f(a) = cos x

and now im stuck. am i correct so far? where do i go from here? thanks.