The convention used in compositions is the Codex of Chess Compositions, in this case Article 16.3:
"Partial Retrograde Analysis (PRA) convention. Where the rights to castle
and/or to capture en-passant are mutually dependent, the solution consists of
several mutually exclusive parts. All possible combinations of move rights,
taking into account the castling convention and the en-passant convention, form
these mutually dependent parts. If in the case of mutual dependency of castling
rights a solution is not possible according to the PRA convention, then the
Retro-Strategy (RS) convention should be applied: whichever castling is executed
first is deemed to be permissible." (emphasis mine)
In this case, we apply PRA first. The castling rights in FEN notation "Kk" is provably impossible, "K" gives us mate in 2, and "k" gives only mate in 5. Therefore we have to apply RS: Whoever castles first denies the other the right. Whence the solution, where white scrambles to castle first.
This position lies in the realm of chess problems, not regular chess games. Thus we have the apply the problemists' rules - the Codex. (Which I might add, is also used by FIDE for their FIDE album composition awards, if you insist on some appeal to authority.)
White is missing R+B+B+P while Black has made two pawn captures.
If we assume that White can castle, then White's R and black-squared B never got out, so Blacks pawn(s) captured the white-square B and P.
The captures must have occured on b6/b5 and c6 (not d6 and c5, because it's a white-squared B). For this to happen, the White pawn must first have been promoted.
We can already see 5 pawn captures by White, and Black is missing only 7 men (6 pieces and 1 P), so there are only two spare captures available to promote the White pawn. This means that the promotion must have occurred either on f8 (from f7) or on h8.
Either of these possibilities means that Black can't castle.
What you say is completely right, but what about the second possibility? Black has either captured a promoted piece or one of the white rooks.
First point means black cannot castle and second white cannot. How are the rules in chess composition when you can only prove that one side cannot castle, but can't prove which?