Concept:Each expression equals 5, so we get two linear equations to solve simultaneously.Explanation:Given: x+y=2y−x+1=5.So x+y=5 and 2y−x+1=5.From x+y=5: equation (1) is x+y=5.From 2y−x+1=5: 2y−x=4, so x−2y=−4. This is equation (2).From (1), write x=5−y.Substitute into (2): (5−y)−2y=−4.Simplify: 5−3y=−4, so −3y=−9.Thus y=3.Substitute y=3 into x=5−y: x=5−3=2.Answer:x=2, which is option B.