I have to add this rational expression but I keep on ending up with 2 different answers each time I try to solve the expression.

2/x + 1/2x

My answer is 4x+1/2x; but I also got 5/2x. Which one is correct and why?

I interpreted it as:

2/x + 1/(2x)
= 4/(2x) + 1/(2x)
= 5/(2x)

But we can also interpret it as:
2/x + (1/2)x
= 2/x + x/2
= 4/(2x) + x^2/(2x)
= (4 + x^2) / 2x

It depends on the expression is shown or typed. Placing parenthesis can help clarify the expression.

hope this helps~ `u`