If we consider the first case, we have then
and
which yields
Using the constraint on β0 and β1 we can then find the optimal value of λ for the different cases. We leave this as an exercise to you.