"Pedro has twice as many carrots as Martha:"
p = 2m
"If Pedro gives 5 carrots to Oliver,"
p - 5 (Oliver is irrelevant.)
"then Martha has 3 times as many carrots as Pedro"
m = 3(p - 5)
We know p in terms of m, so substitute it in:
m = 3(2m - 5)
Distribute the 3:
m = 6m - 15
Subtract 6m from both sides:
m-6m=-15
Combine variable terms:
-5m=-15
Divide out -5
m = -15/-5
m = 3
The answer is c) 3