r = kx - 4x

x depends on what you choose k and r to be. First, factor the right side, then divide:

r = kx - 4x

r = x(k-4)

r / (k-4) = x

Make sure in your solution to include that k is not ever equal to 4. This causes a disaster.