We have the next information
When he left the library he read 8/8-7/8= 1/8
then he read 1/10
after dinner, he read 2/5
First, we need to sum the fraction of the book he read

we need to have the same denominator in order to sum the fractions

the book complete represent 8/8 so we need to subtract 5/8 from the fraction of the complete book

the fraction of the book does he have left to read is 3/8