Final answer:
The fraction of students in a boy's hostel who like to eat both veg and non-veg is 2/5. There are 8 students who eat only veg, 16 who eat only non-veg, and the remaining 16 students eat both.
Step-by-step explanation:
Let's find what fraction of the total number of students in a boy's hostel like to eat both veg and non-veg. Given that the hostel has 40 students, where 1/5 like to eat veg only and 2/5 like to eat non-veg only, we can calculate the fraction of students who eat both.
First, find the number of students who eat only veg:
1/5 of 40 = 1×40/5 = 8 students.
Next, find the number of students who eat only non-veg:
2/5 of 40 = 2×40/5 = 16 students.
By adding the veg-only and non-veg-only eaters, we get a total of 8 + 16 = 24 students. Thus, the remaining students who eat both are 40 - 24 = 16 students.
The fraction of students who eat both is 16/40, which can be simplified to 2/5 by dividing both the numerator and denominator by 8.