Because M is the midpoint of segment JK, JM=MK.
Now, substitute, and you will get 5x-10=x+14.
You can easily solve from here.
5x-10=x+14
5x-x-10=x-x+14
4x-10=14
4x-10+10=14+10
4x=24
4x/4=24/4
x=6
Since we now know x=6 and the two segments are congruent, both JM and MK are 6.
JM+MK= 6+6=12, therefore JK=12.