Tā zài péngyou jiā báichī bái zhù le hǎojǐ gè yuè.
He ate and stayed for free at a friend's place for several months.
Tips
usage
白 in this context means for nothing / for free, not the color white. It works as a prefix: 白吃 (eat free), 白住 (stay free), 白拿 (take for free). The phrase 白吃白喝 (bái chī bái hē) means to freeload on food and drink.