chess.com says the solution is Qc6, but I think that Rc7 is far better move! Cause if king takes then comes Qc6 and it's checkmate. Can you explain why am I wrong?
I think chess.com's solution is wrong

1.Rxc7 Kxc7 2.Qxc6 Kb8 3.Rb1 Qb6 4.Rxb6
Looks like you just get a perpetual check, which is a draw and in any case black has more material, so you're a bit lucky to get a draw.
I'm pretty sure you can use an engine on this website to look at why certain moves work or don't work.
But also "if black takes" is a dangerous phrase. You always have to consider moves like 1...Kb8 2.Rb1 and now 2...Kxc7 which at a glance seems to win for black. So maybe that line would go 1...Kb8 2.Rb7 Kxb7 3.Qxc6 with another draw.
Anyway, after 1.Qxc6 white threatens two different mates in 1.