Trigonometry AS I've been trying this question for a while but still don't understand it. Do you use trigonometry to form a equation for the sides and then add them up as you know the perimeter is 40?
 A: Note: Weird names of the sides of the triangle in your task - generally against the vertex $A$ is the side $a$, against $B$ is the side $b$, and against $C$ is the side $c$.

Ad (a):
By the Law of cosines
$$a^2 = {14}^2 + b^2 - 2\cdot14b\cos \theta$$
so $$\cos \theta = {a^2 - {14}^2 - b^2 \over 28b}\tag1$$
Then use the fact that 
\begin{align}
a + b + 14 &= 40\\
a+b &= 26\\
a &= 26 - b\tag2
\end{align}
and substitute $(2)$ into $(1)$
A: Construct a perpendicular from $B$ to $AC$ such that it touches $AC$ at point $D$.
Using the fact that Perimeter is $40cm$
$$a+b+14=40 \\ \Rightarrow a=26-b\\ $$
Using Pythagoras Theorem on Triangle $ABD$, $$\ \ \ \ \ (26-b)^2=BD^2+AD^2 \\\Rightarrow (26-b)^2 -AD^2=BD^2 \\ \\ \\ \\ \\ \\$$
Using Pythagoras Theorem on Triangle $CBD$,
$$\begin {align}
  \ \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ b^2&=(26-b)^2-AD^2+DC^2\\
&=(26-b)^2-(14-DC)^2+DC^2\\
&=676+b^2-52b-196-DC^2+28DC+DC^2\\
\\ \Rightarrow 0&=480 -52b+28DC\\
\Rightarrow DC&=\frac{52b-480}{28}=\frac {13b}{7}-\frac {120}{7}\\
\Rightarrow \frac {DC}{b} &=\cos \theta= \frac {13}{7}-\frac {120}{7b} 
\end {align}$$
