Answer
$(a)$ is incorrect and $(b)$ is correct
Work Step by Step
Consider $(\dfrac{1}{\cos x}) \int \cos x dx=(\dfrac{1}{\cos x}) [\sin x+C]$
This gives $(\dfrac{1}{\cos x}) \int (\cos x) dx=[\dfrac{\sin x}{\cos x}]+\dfrac{C}{\cos x}$
$\implies (\dfrac{1}{\cos x}) \int (\cos x) dx=\tan x+\dfrac{C}{\cos x}$
Therefore, we conclude that the solution $(a)$ is incorrect because the arbitrary constant depends on the values of $C$ .
whereas the solution $(b)$ is correct because it is same as the solution.