Answer
See the detailed answer below.
Work Step by Step
$$\color{blue}{\bf [a]}$$
We know for thin lenses that
$$\dfrac{n_1}{s_1}+\dfrac{n_2}{s_1'}=\dfrac{n_2-n_1}{R_1}\tag 1$$
where $R_1$ here is for the first surface of the lens, $n_1$ is for the fluid, and $n_2$ is for the lens.
By the same approach, for the second surface of the lens, where the rays come out from the lens $n_2$ to the fluid $n_1$,
$$\dfrac{n_2}{s_2}+\dfrac{n_1}{s_2'}=\dfrac{n_1-n_2}{R_2}$$
where $s_2$ is the object for the second surface which is the virtual image of the first surface, so that $s_2=-s_1'$,
$$\dfrac{n_2}{-s_1'}+\dfrac{n_1}{s_2'}=\dfrac{n_1-n_2}{R_2}\tag 2$$
(1) Plus (2),
$$\dfrac{n_1}{s_1}+\overbrace{\dfrac{n_2}{s_1'}+\dfrac{n_2}{-s_1'}}^{=0}+\dfrac{n_1}{s_2'}=\dfrac{n_2-n_1}{R_1}+\dfrac{n_1-n_2}{R_2} $$
$$\dfrac{n_1}{s_1}+\dfrac{n_1}{s_2'} =\dfrac{n_2-n_1}{R_1}-\dfrac{n_2-n_1}{R_2}$$
$$\dfrac{n_1}{s_1}+\dfrac{n_1}{s_2'} =(n_2-n_1)\left[ \dfrac{1}{R_1}-\dfrac{1}{R_2}\right] $$
Divide both side by $n_1$
$$\overbrace{\dfrac{1}{s_1}+\dfrac{1}{s_2'}}^{\dfrac{1}{f}} =\dfrac{n_2-n_1}{n_1}\left[ \dfrac{1}{R_1}-\dfrac{1}{R_2}\right] $$
Therefore,
$$\boxed{{\dfrac{1}{s_1}+\dfrac{1}{s_2'}}={\dfrac{1}{f}} =\dfrac{n_2-n_1}{n_1}\left[ \dfrac{1}{R_1}-\dfrac{1}{R_2}\right] }$$
$$\color{blue}{\bf [b]}$$
Now the two radii are equal in magnitude but $R_1=40$ cm since it is convex toward the object and $R_2=-40$ cm since it is concave toward the object.
$\Rightarrow$ when the glass lens is in air, $n_1=1$, $n_2=1.5$:
Using the boxed formula above,
$$ {\dfrac{1}{f}} =\dfrac{n_2-n_1}{n_1}\left[ \dfrac{1}{R_1}-\dfrac{1}{R_2}\right] $$
$$f=\dfrac{n_1}{n_2-n_1}\left[ \dfrac{1}{R_1}-\dfrac{1}{R_2}\right]^{-1}$$
Plugging the known;
$$f=\dfrac{1}{1.5-1}\left[ \dfrac{1}{40}-\dfrac{1}{-40}\right]^{-1}$$
$$f=\color{red}{\bf 40}\;\rm cm$$
$\Rightarrow$ when the glass lens is in water, $n_1=1.33$, $n_2=1.5$:
$$f=\dfrac{n_1}{n_2-n_1}\left[ \dfrac{1}{R_1}-\dfrac{1}{R_2}\right]^{-1}$$
Plugging the known;
$$f=\dfrac{1.33}{1.5-1.33}\left[ \dfrac{1}{40}-\dfrac{1}{-40}\right]^{-1}$$
$$f=\color{red}{\bf 156}\;\rm cm$$