Answer
a) $t= \dfrac{ (n_1+n_2)L}{2c} $
b) $5.17\times 10^{-11}\;\rm s$
Work Step by Step
a) From the given graph, the slope is given by
$$m={\rm Slpoe}=\dfrac{n_2-n_1}{L-0}$$
And according to the straight line equation $y=mx+b$, then
$$n=\left(\dfrac{n_2-n_1}{L}\right)x+n_1\tag 1$$
We know that the speed of light in some matweroal is given by
$$v=\dfrac{c}{n}\tag 2$$
where $c$ is the speed of light, and $n$ is the index of refraction of the material. So the time it takes light to travel a distance of $dx$ in some material is given by
$$dt=\dfrac{dx}{v}$$
Plugging $v$ from (2);
$$dt=\dfrac{ndx}{c}$$
Plugging $n$ from (1);
$$dt=\dfrac{dx}{c}\left[\left(\dfrac{n_2-n_1}{L}\right)x+n_1\right]$$
integrating both sides;
$$\int_0^tdt=\left(\dfrac{n_2-n_1}{cL}\right)\int_0^L xdx+\dfrac{n_1}{c}\int_0^Ldx$$
$$t=\left(\dfrac{n_2-n_1}{2cL}\right)x^2\bigg|_0^L+\dfrac{n_1}{c}x\bigg|_0^L$$
$$t=\left(\dfrac{n_2-n_1}{2cL}\right)L^2+\dfrac{n_1}{c}L$$
$$t=\left(\dfrac{n_2-n_1}{2c}\right)L +\dfrac{n_1}{c}L$$
$$t= \dfrac{n_2L-n_1L+2n_1L}{2c} $$
$$\boxed{t= \dfrac{ (n_1+n_2)L}{2c} }$$
---
b) Plugging the known into the boxed formula above;
$$ t= \dfrac{ (1.5+1.6)(1.0\times 10^{-2})}{2(3\times 10^8)} $$
$$t=\color{red}{\bf 5.17\times 10^{-11}}\;\rm s$$