I'm guessing you want to know what the new function looks like.
Compression takes place when you have a function that constant is between 0 and 1
so f(x) = 1/2 5x We'd best not do any more to it for now because it will be altered by the next two transformations.
You want to shift this to the right two units.
That means f(x-2) will bu put into x on the right. You will get
f(x - 2) = 1/2*5(x - 2)
Finally, we want to go up 2 units. That's done by adding another term on what we have already.
f(x -2) = 1/2 * 5(x - 2) + 2
A line is not a very good example to be showing these transformations. I'll include a graph.
The red line is f(x) = 5x
The blue line is f(x - 2) = 1/2 * 5(x -2) + 2