What is the rule if the input is 5 and output is 2 than input is 6and output is 3than input is 7and output 5 than input is 8 and output is 6

(5,2), (6,3), (7,5), (8,6)

I think there is at least one typo. The rule is not linear. Maybe a piecewise linear function?

and that's "then" not "than"