You seem ok so far except you forgot the arbitrary constant on the RHS. So,

5 ln|y| = 0.5t - cost + C

=> ln|y| = 0.1t - 0.2cost + C

=> y = e^(0.1t - 0.2cost + C)

Now y(0) = 1

=> 1 = e^(0.1(0) - 0.2cos(0) + C)

=> 0.1(0) - 0.2cos(0) + C = 0

=> - 0.2 + C = 0

=> C = 0.2

so we have y = e^(0.1t - 0.2cost + 0.2)