for two variables you need two equations but first, what you know
P = 82 cm
now the two eq.s
P = 2a + 2b
82 = 2a + 2b (you plugged in what you know)
a = b + 5
and now you put one in the other
82 = 2(b + 5) + 2b
82 = 2b + 10 + 2b
82 - 10 = 4b
4b = 72 /:4
b = 18
and now plug in b in the equation for a
a = b + 5
a = 18 + 5
a = 23
now check your work
P = 2a + 2b
82 = 2*23 + 2*18
82 = 46 + 36
82 = 82