I think you guys are overlooking something. He said surgery is his LAST rotation. So I'd definitely say OB before surgery. Not because it will bring all that much in terms of prepping for Surgery, but because this allows Internal Med to happen *earlier* for him. People argue as to whether IM or Surgery are the more important rotation to prep for the other (hint: IM is important for surgery, not vice versa), but if this is his last rotation, you don't want all his previous rotations to be taken before IM.
So go with OB right before surgery solely because your experience with every rotation (OB, surgery, all others) will be better if you've already done IM earlier in the year. I don't like the idea of that being anywhere near the end of your 3rd year.