Perl 6, 2524 bytes
-1 byte thanks to Grimy
{$^a==$^b|5$^a-$b|$b$^b==5|0|-5|$b+55|5-2*$b}
Port of @Arbo's solution. This uses the Any Junction rather than checking if a
is a the list. Technicallybut technically, ^
could work as well.
Explanation:
{ } # Anonymous code block
$^a== $^a-$^b== # Is the first inputdifference equal to
| | | | # Any of
$^b # The second0 input
5-$b # 5 - b
$b-5 # b - 5
$b+5 # b + 5-2*$b