On the first day, Matthew hiked m miles
On the second day, he hiked twice as much as the first day
Twice means multiply the first day by 2
On the second day, he hiked 2 x m = 2m miles
On the third day, he hiked 5 miles
Then the total distance he hiked = m + 2m + 5
Add the like terms (m + 2m) = 3m
The expression is 3m + 5