Youve asked this question pretty vaguely with some missing details, but let me try to help.
Using relative valuation - they would likely ask you to choose a bond with the highest spread and determine whether it is a good investment or not based on relative yield breakeven analysis. If this is the case, divide by the higher duration of the 2 bonds in comparison to determine if the bond with the higher spread if beneficial if yields increase to find the breakeven point.
Another way they can present the question is if they say the bonds are mean reverting to their average. They will give standard deviation in this case. The difference in spread/st dev will determine the best investment, as yields will contract to their average, price goes up.
Best bond to sell? Do the opposite. If the spread is expected to increase vs the current spread, the yield increases, prices go down. Find the bond that has the largest spread increase and sell it.