Formula of mean for grouped data and explain each term

OJAS's image