Step 1: Compare the options
Options differ in the coefficient and the constant. The constant $k$ in $f'$ should appear as the coefficient of the trigonometric part.
Step 2: Use the conditions
Since $f'(0)=k=5$, the trigonometric part is $5(\sin x+\cos x)$, because the integral of $\cos x-\sin x$ is $\sin x+\cos x$.
Step 3: Check the constant
At $x=\dfrac{\pi}{2}$: $5(1)+c=19$ gives $c=14$, matching the fourth option.
Final Answer:
The coefficient 5 and the constant 14 match the last option.
\[ \boxed{\text{(D) }5(\cos x+\sin x)+14} \]