a) If your function reads then r is considered to be a constant.
b) If your function reads then x is considered to be a constant.
c) If your function reads then x and r are considered to be a constant.
According to your rematk it seems to be a)
Yes.
Or, if it is in a case where r is also a variable, and the differentiation is with respect to x, then
d/dx 2000/r
= d/dx 2000*r^(-1)
= 2000*[-1*r^(-2)*dr/dx]
= -[2000/(r^2)](dr/dx)