You know that the 2 red pencils represent 25% of the total number of pencils (100%) that are in the backpack. To determine the total number of pencils you can use cross multiplication:
25%____2 pencils
100%____ x pencils
Both relationships are at the same ratio, so that:
Multiply both sides by 100 to determine the value of x
There are 8 pencils on his backpack.