Solve the interior Dirichlet Problem
$$(r^2u_r)_r+\dfrac{1}{\sin\phi}(\sin\phi~u_\phi)_\phi+\dfrac{1}{\sin^2\phi}u_{\theta\theta}=0\,, \,\,\,\,\,\,\, 0<r<1 $$
where $u(1,\phi)=\cos3\phi$
Solve the interior Dirichlet Problem
$$(r^2u_r)_r+\dfrac{1}{\sin\phi}(\sin\phi~u_\phi)_\phi+\dfrac{1}{\sin^2\phi}u_{\theta\theta}=0\,, \,\,\,\,\,\,\, 0<r<1 $$
where $u(1,\phi)=\cos3\phi$
You are really just solving Laplace's equation
$$\Delta u = 0$$
in the interior of the unit sphere, with a boundary condition that is independent of $\theta$. The solution to this problem is well known:
$$u(r,\phi,\theta) = \sum_{n=0}^{\infty} a_n r^n \, P_n(\cos{\phi})$$
where $P_n$ is the $n$th Legendre polynomial. You may derive this solution through a separation of variables; the separation constant turns out to be $n (n+1)$. See, for example, S. Holland, Applied Analysis by the Hilbert Space Method, Secs. 4.6 and 7.8. The coefficients $a_n$ are found using the orthogonality of the Legendres:
$$\begin{align}a_n &= \frac{2 n+1}{2} \int_0^{\pi} d\phi\, \sin{\phi} P_n(\cos{\phi}) \, \cos{3 \phi}\\ &=\frac{2 n+1}{2} \int_{-1}^1 dt \: P_n(t) \,(4 t^3-3 t) \end{align}$$
Express $4 t^3-3 t$ in terms of Legendres:
$$4 t^3-3 t = -\frac{3}{5} P_1(t) + \frac{8}{5} P_3(t)$$
By orthonormality, these coefficients of the Legendres are the coefficients of the Legendres in the solution. Therefore:
$$u(r,\phi,\theta) = -\frac{3}{5} r P_1(\cos{\phi}) + \frac{8}{5} r^3 P_3(\cos{\phi})$$
$(r^2u_r)_r+\dfrac{1}{\sin\phi}(\sin\phi~u_\phi)_\phi+\dfrac{1}{\sin^2\phi}u_{\theta\theta}=0$
$r^2u_{rr}+2ru_r+u_{\phi\phi}+\cot\phi~u_\phi+\csc^2\phi~u_{\theta\theta}=0$
Note that this PDE is separable.
Let $u(r,\phi,\theta)=f(r)g(\phi)h(\theta)$ ,
Then $r^2f''(r)g(\phi)h(\theta)+2rf'(r)g(\phi)h(\theta)+f(r)g''(\phi)h(\theta)+\cot\phi~f(r)g'(\phi)h(\theta)+\csc^2\phi~f(r)g(\phi)h''(\theta)=0$
$\dfrac{r^2f''(r)+2rf'(r)}{f(r)}+\dfrac{g''(\phi)+\cot\phi~g'(\phi)}{g(\phi)}+\dfrac{\csc^2\phi~h''(\theta)}{h(\theta)}=0$
$\dfrac{r^2f''(r)+2rf'(r)}{f(r)}=-\dfrac{g''(\phi)+\cot\phi~g'(\phi)}{g(\phi)}-\dfrac{\csc^2\phi~h''(\theta)}{h(\theta)}=\dfrac{4s^2-1}{4}$
$\begin{cases}\dfrac{r^2f''(r)+2rf'(r)}{f(r)}=\dfrac{4s^2-1}{4}\\-\dfrac{g''(\phi)+\cot\phi~g'(\phi)}{g(\phi)}-\dfrac{\csc^2\phi~h''(\theta)}{h(\theta)}=\dfrac{4s^2-1}{4}\end{cases}$
$\begin{cases}r^2f''(r)+2rf'(r)-\dfrac{4s^2-1}{4}f(r)=0\\\dfrac{\csc^2\phi~h''(\theta)}{h(\theta)}=-\dfrac{g''(\phi)+\cot\phi~g'(\phi)}{g(\phi)}-\dfrac{4s^2-1}{4}\end{cases}$
$\begin{cases}r^2f''(r)+2rf'(r)-\dfrac{4s^2-1}{4}f(r)=0\\\dfrac{h''(\theta)}{h(\theta)}=-\dfrac{\sin^2\phi~g''(\phi)+\sin\phi\cos\phi~g'(\phi)}{g(\phi)}-\dfrac{4s^2-1}{4}\sin^2\phi=-t^2\end{cases}$
$\begin{cases}r^2f''(r)+2rf'(r)-\dfrac{4s^2-1}{4}f(r)=0\\\dfrac{h''(\theta)}{h(\theta)}=-t^2\\-\dfrac{\sin^2\phi~g''(\phi)+\sin\phi\cos\phi~g'(\phi)}{g(\phi)}-\dfrac{4s^2-1}{4}\sin^2\phi=-t^2\end{cases}$
$\begin{cases}r^2f''(r)+2rf'(r)-\dfrac{4s^2-1}{4}f(r)=0\\h''(\theta)+t^2h(\theta)=0\\\sin^2\phi~g''(\phi)+\sin\phi\cos\phi~g'(\phi)+\biggl(\dfrac{4s^2-1}{4}\sin^2\phi-t^2\biggr)g(\phi)=0\end{cases}$
$\begin{cases}f(r)=c_1(s)r^{s-\frac{1}{2}}+c_2(s)r^{-s-\frac{1}{2}}\\h(\theta)=c_3(t)\sin\theta t+c_4(t)\cos\theta t\\g(\phi)=c_5(s,t)P_{s-\frac{1}{2}}^t(\cos\phi)+c_6(s,t)Q_{s-\frac{1}{2}}^t(\cos\phi)\end{cases}$
$\therefore u(r,\phi,\theta)=\int_t\int_sC_1(s,t)r^{s-\frac{1}{2}}\sin\theta t~P_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_2(s,t)r^{s-\frac{1}{2}}\sin\theta t~Q_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_3(s,t)r^{s-\frac{1}{2}}\cos\theta t~P_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_4(s,t)r^{s-\frac{1}{2}}\cos\theta t~Q_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_5(s,t)r^{-s-\frac{1}{2}}\sin\theta t~P_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_6(s,t)r^{-s-\frac{1}{2}}\sin\theta t~Q_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_7(s,t)r^{-s-\frac{1}{2}}\cos\theta t~P_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt+\int_t\int_sC_8(s,t)r^{-s-\frac{1}{2}}\cos\theta t~Q_{s-\frac{1}{2}}^t(\cos\phi)~ds~dt$
The condition about the information of $\theta$ is not clear, so I stop here until OP has properly clarified.