calculus - why is a variable being differentiated like a constant?

Q8, I checked the solution online, and they're treating p (perimeter) as a constant while differentiating. Isn't it a variable, that depends on radius and theta? sorry if this question is dumb
9f931811-fc49-4e97-a9d2-707644e53932.jpg
rn_image_picker_lib_temp_5e1d3e67-84f5-41b3-b8a3-095340f47377.jpg
Was this page helpful?