The condition is symmetric so we can assume that b≤a.
The first case is when a=b. In this case, a!+a=5m for some positive integer m. We can rewrite this as a⋅((a−1)!+1)=5m. This means that a=5k for some integer k≥0. It is clear that k cannot be 0. If k≥2, then (a−1)!+1=5l for some l≥1, but a−1=5k−1>5, so 5∣(a−1)!, which is not possible because 5∣(a−1)!+1. This means that k=1 and a=5. In this case, 5!+5=125, which gives us the solution (5,5).
Let us now assume that 1≤b<a. We have a!+b=5x and b!+a=5y. Since b<a, b!+a<a!+a, so 5y<5x, which implies y<x. If x≥2, then 5∣a!. However, 5∣5y=a!+1, which leads to a contradiction. We conclude that x=1 and a=4. From here a!+b=25 and b!+a=5, so we get two more solutions: (1,4) and (4,1).
Now we focus on the case 1<b<a. Because b∣5x and b>1, we have b=5z for z≥1. If z≥2, then 5b=5, which gives us a≥10. However, this would mean that 25∣a!, 5∣b and 25∤b, which is not possible, because a!+b=5x and 25∣5x.
We conclude that the only solutions are (1,4), (4,1) and (5,5).