#y = -|x-3| + 5 #
# |x-3| = 5 - y#
# x-3 = pm (5 - y)#
# x = 3 pm (5 - y)#
The inverse function is therefore:
#f^(-1)(x) = 3 pm (5 - x)#
There would be no harm in verifying this for #x = 2# and #x = 4#, ie either side of #x = 3# which is the point at which #(x-3)# changes sign.
For #x = color(red)(2)#, we get #y = 4#. Our inverse function suggests that #f^(-1)(4) = 3 pm 1 = 4, color(red)(2)#.
And for #x = color(blue)(4)#, we also get #y = 4#, which we expect from the symmetry. Our inverse function suggests that #f^(-1)(4) = 3 pm 1 = color(blue)(4),2#.
graph{y = -|x-3| + 5 [-10, 10, -5, 5]}