first off I would like to say that the solution in the picture is most likely incorrect since I didn't get full marks.
When the question refers to part a.) it's just referring to the darboux's def'n in the prev. question that I did not include in the picture.
Anyway, I need help understanding when I can use a dense subset. I feel like I don't really understand the concept and I'm just using it randomly. I know that my prof said that a dense subset can be used for reasoning when the range alternates from rational to irrational. Can anybody help? Thanks!
I also apologize for the ugly hand writing.

The issue is that $m_{i}=\ln 1=0$, $M_{i}=\ln\sqrt{3}$ so $L(f,P)=0$, $U(f,P)=\ln\sqrt{3}$.
As @Berci has noted, there is also an issue on the $\sup,\inf$, they are numbers, not sets.