Applying Snell's law at $$A$$
$$\eqalign{
& 1 \times \sin {45^ \circ } = \sqrt 2 \times \sin {r_1} \cr
& \therefore \,\,{r_1} = {30^ \circ }\,\,\,\,.....\left( {\text{i}} \right) \cr} $$

Applying Snell's law at $$B$$
$$\eqalign{
& \sqrt 2 \sin C = 1 \times \sin {90^ \circ } \cr
& \therefore \,\,C = {45^ \circ }\,\,\,\,\,.....\left( {{\text{ii}}} \right) \cr
& {\text{In }}\Delta \,AMB,{90^ \circ } + \theta + {r_1} + \left( {{{90}^ \circ } - C} \right) = {180^ \circ }\left( {{\text{From fig}}{\text{.}}} \right) \cr
& \therefore \,\,\theta = {15^ \circ } \cr} $$