Your title is confusing. This the heat equation for a rod which is a classic example.
Setting up the problem
$$ \frac{\partial u}{\partial t} = \frac{k}{c}\frac{\partial^{2} u}{\partial x^{2}} \tag{1}$$
with boundaries given as
$$ BC1 : \frac{\partial u}{\partial x}(0,t) = 0 \\ BC2 : \frac{\partial u}{\partial x}(L,t) = \frac{-\alpha }{k}(u -u_{0}) \tag{2}$$
and initial condition
$$ IC: u(x,0) = \eta(x) \tag{3} $$
If you solve it you should get
$$ \phi(x) = c_{1}\cos(\sqrt{\lambda}x) +c_{2}\sin(\sqrt{\lambda}x) \tag{4} $$
which gives
$$ \frac{d\phi}{dx} = \sqrt{\lambda} \big( -c_{1} \sin(\sqrt{\lambda} x) +c_{2}\cos(\sqrt{\lambda}x \tag{5} \big)$$
then
$$ \frac{d\phi(0)}{dx} = 0 \implies c_{2} = 0 \tag{6}$$
so your equation becomes
$$ \phi(x) = c_{1}\cos(\sqrt{\lambda}x) \tag{7} $$
to determine the eigenvalues we have
$$ \frac{d\phi(L)}{dx} = -c_{1}\sqrt{\lambda} \sin(\sqrt{\lambda} L) = -\frac{-\alpha}{k}(u-u_{0}) \tag{8}$$
If I interpret the second boundary condition you get something like this.
$$ \frac{d\phi(L)}{dx} = -c_{1}\sqrt{\lambda} \sin(\sqrt{\lambda} L) = -\frac{-\alpha}{k}\bigg(c_{1} \cos(\sqrt{\lambda} L) + \eta(L) \bigg) \tag{9}$$
For the next part
$$ u(x,t) = A_{0} + \sum_{n=1}^{\infty} \cos(\sqrt{\lambda}x) e^{- \lambda \frac{k}{c}t} \tag{10} $$
Getting the coefficients
There is something called Fourier's trick. It comes from the orthogonality of eigenfunctions with different eigenvalues. This is the original derivation, it is simply for homogenous boundaries.
$$ \int_{0}^{L} \cos(\frac{n \pi x}{L} ) \cos(\frac{m \pi x}{L} )dx =\begin{align}\begin{cases} 0 & n \neq m \\ \frac{L}{2} & n = m \neq 0 \\ L & n = m =0 \end{cases} \end{align} \tag{11}$$
$$ \int_{0}^{L} \eta(x) \cos(\frac{m \pi x}{L}) dx = \sum_{n=0}^{\infty} A_{n} \int_{0}^{L} \cos(\frac{n \pi x}{L}) \cos(\frac{m \pi x}{L}) dx \tag{12}$$
using the orthogonality we get
$$ \int_{0}^{L} \eta(x) \cos(\frac{m \pi x}{L}) dx = A_{m} \int_{0}^{L} \cos^{2} \frac{m \pi x}{L} dx \tag{13} $$
when $m=n$, there are two cases $m=0$, $m\neq 0$ which yield the below results.
$$ A_{0} = \frac{1}{L} \int_{0}^{L} \eta(x) dx \tag{14}$$
$$ A_{m} = \frac{2}{L}\int_{0}^{L} \eta(x)\cos(\sqrt{\lambda}x) dx \tag{15}$$
If you note when we evaluate the right hand of the expression below we will get the equations, 14 and 15.
$$ \int_{0}^{L} \eta(x) \cos(\frac{0 \pi x}{L}) dx = A_{0} \int_{0}^{L} \cos^{2} \frac{0 \pi x}{L} dx \tag{16} $$
$$ \int_{0}^{L} \eta(x) dx = A_{0} \int_{0}^{L} 1 dx \tag{17} $$
$$ \int_{0}^{L} \eta(x) dx = A_{0} L \tag{18} $$
So we simply divide by $L$ giving
$$ A_{0} = \frac{1}{L} \int_{0}^{L} \eta(x) dx \tag{19} $$
In order to get $A_{m}$ if you look at line $11$ there is case $2$ and we look down to line $13$. Then you would observe the right hand part of the expression will evaluate you to $\frac{L}{2}$
$$ \int_{0}^{L} \eta(x) \cos(\frac{m \pi x}{L}) dx = A_{m} \int_{0}^{L} \cos^{2} \frac{m \pi x}{L} dx \tag{20} $$
$$ \int_{0}^{L} \eta(x) \cos(\frac{m \pi x}{L}) dx = A_{m} \frac{L}{2}\tag{21} $$
If you move this around then we get
$$ A_{m} = \frac{2}{L}\int_{0}^{L} \eta(x) \cos(\frac{m \pi x}{L}) dx \tag{22} $$