The author postulates that Ted hates David because David got married while Ted remained alone.
The author hiints that Ted doesn't like David, because David was married and Ted wasn't.
The author said Ted and David are good friends because Ted supports davids young marriage.