Let assume we are looking at the euclidian inner product above $\mathbb{R}^3$ namely $$\langle u, v \rangle=\sum_{i=1}^{3}u_i\cdot v_i=u_1v_1+u_2v_2+u_3v_3$$
Now looking if we have:
$$u=(cosb-a^2cos(3b),sinb+a^2sin(3b),2a\cdot cos(2b))$$ and $$v=(-asinb+a^3sin(3b),acosb+a^3cos(3b),-2a^2sin(2b))$$
How would we take $$\langle u, v \rangle$$ Can we use linearity?
yes you can expand with the ordinary rules for inner product