Hi everyone. This is my first post here, and I hope I am doing everything right. Please feel free to correct me if I've done anything wrong. Thanks in advance for taking the time to read through my frustrating issues.

Okay, so I'm doing transformations using y=af[K(x-d)]+c.

I know that K>1 = horizontal compression of a function and 0<k, & K<1 = horizontal stretch of a function.

I've been given the base function f(x)=x, and have been told that it is being stretched horizontally by a factor of 1/2, and having some other transformations applied to it. I understand everything else that's been provided in the answer, but I don't understand what's going on with K.

The answer the text provides states that, since the graph is being stretched horizontally by a factor of 1/2, then K=2. How does K=2? Shouldn't it equal 1/2? Also, if K=2, then the graph is being compressed horizontally rather than stretched, correct? What is going on here? Is my text book wrong? Or am I not getting something?

Secondly,

it's occurring to me that I don't know how to work with fractions that include variables. Another question I have done involving transformations looked like

Y=(-1/5(1/x)-1)-3

and the textbook reduced it to (5/x-1) -3, and I have absolutely no idea how that happened.

Thank you so much for your help, I'm pulling my hair out over here trying to understand what the hell is going on.