user4418: According to the FIDE Laws of Chess:

4.4 If a player having the move:
  4.4.1 touches his king and a rook he must castle on that side if it is legal to do so
  4.4.2 deliberately touches a rook and then his king he is not allowed to castle on that side on that move and the situation shall
  be governed by Article 4.3.1

Yesterday in the semi-finals of the Chess960 World Championships in the following position Nepomniatchi tried to castle kingside by first picking up his rook to move it off the king's destination square (g1) to f1, the rook's destination square and then moving the king to g1. 
The arbiter ruled in accordance with 4.4.2 that he was not allowed to castle kingside and the king must stay on e1 and he got a bad position. Later, after an appeal, this was overruled and they replayed the game.
 [title "Neponiatchi - So, 2019 Chess960 1/2 final"]
 [fen "2nr1r1k/pb1n1pqp/1p2p1p1/1N1pN3/5P2/1P4P1/P2PPQ1P/2R1K1RB w - - 0 1"]

Jonathan Tisdall, on Twitter, reported that:

According to organizer Jøran Aulin-Jansson, the rook being on g1, the
  king destination, caused enough confusion to overturn the strict
  ruling

This raises the question: In such situations how can the player legally castle on the side where the rook starts on the king's destination square?
One humorous, though impractical at short time limits, solution was suggested here.
Even more impractical was MrDodgy's suggestion:

A true pro would pick up the rook from g1, toss it up in the air,
  slide the king to g1 and the rook would land dead centre of f1.  Press
  the clock, lean back in chair.  Flex.

Still illegal.

user9188: Stian Yttervik made a comment that I think deserves to be expanded into a full answer. (I have changed the wording somewhat. That is not Stians fault)
Just pretend that the King is capturing the Rook.  
In other words: Move the King first. Use the King to gently push the Rook off-center and firmly place the King where it should be.  Then move the Rook where it should be.  Hit the clock.

user8201: There are two problematic cases in Chess960 castling:
(1) rook starts on king’s destination square.
(2) king starts on king’s destination square.

It is not beyond the wit of man for the FIDE Laws to handle those cases explicitly. Maybe a future version of the rules will do so.
However the most important FIDE rule here is:

Too detailed a rule might deprive the arbiter of his freedom of judgement
  and thus prevent him from finding the solution to a problem
  dictated by fairness, logic and special factors.

It must be difficult to rule in the excitement of such a situation. But had not GM So generously agreed to draw the game, the ruling could have effectively terminated the semi-final. The moral for players is to remain calm, and exercise opportunities for appeal. 

user19877: I saw this in the chess news on a couple of sites, and it seems pretty simple to me. Pick up the K, and move it to g1, simultaneously pushing the rook off the g1 square. Then move the rook to its proper square.
In any case, you should pick up the K first, and then if you also want to pick up the rook, grab it second, and move them simultaneously. Either way, you are in compliance.

user2944: Touch your king, then your rook.  By rule 4.4.1, you are now required to castle.  You can now move the king and rook to their proper squares however you like, since you are already forced into a specific move and any subsequent piece touches can't change that.

user4418: The FIDE Laws of Chess actually cover this with a recommendation without mentioning the problem.

II.3.2.5.1 When castling on a physical board with a human player, it
  is recommended that the king be moved outside the playing surface next
  to his final position, the rook then be moved from its starting
  position to its final position, and then the king be placed on his
  final square

The first time I read this I though "What a daft thing to suggest? Who is going to do that?" but now I see the point.
The FIDE Laws of Chess go on to state:

II.3.2.7 Notes
  II.3.2.7.1 To avoid any misunderstanding, it may be useful to state "I am about to
  castle" before castling.

Suppose Nepomniatchi had read that before and said those words before castling, would the arbiter have allowed him to castle the way he did?
So, it looks like this was thought of when the rules were written and they were written accordingly.
For practical play there is a simpler solution. According to 4.4.1 touching the king then the rook must be followed by castling. In cases where either the rook is on the king's square or the king is on the king's square just touch king then rook and then make the move. This solves all the associated problems.

4418: <p>According to the FIDE Laws of Chess:</p>

<blockquote>
  <p>4.4 If a player having the move:<br>
  4.4.1 touches his king and a rook he must castle on that side if it is legal to do so<br>
  4.4.2 <strong>deliberately touches a rook and then his king he is not allowed to castle on that side on that move</strong> and the situation shall
  be governed by Article 4.3.1</p>
</blockquote>

<p>Yesterday in the semi-finals of the Chess960 World Championships in the following position Nepomniatchi tried to castle kingside by first picking up his rook to move it off the king's destination square (g1) to f1, the rook's destination square and then moving the king to g1. </p>

<p>The arbiter ruled in accordance with 4.4.2 that he was not allowed to castle kingside and the king must stay on e1 and he got a bad position. Later, after <a href="https://twitter.com/chess24com/status/1189224327994052608" rel="noreferrer">an appeal</a>, this was overruled and <a href="https://twitter.com/chess24com/status/1189228348217724928" rel="noreferrer">they replayed the game</a>.</p>

<pre><code> [title "Neponiatchi - So, 2019 Chess960 1/2 final"]
 [fen "2nr1r1k/pb1n1pqp/1p2p1p1/1N1pN3/5P2/1P4P1/P2PPQ1P/2R1K1RB w - - 0 1"]
</code></pre>

<p>Jonathan Tisdall, <a href="https://twitter.com/GMjtis/status/1189229273418260485" rel="noreferrer">on Twitter</a>, reported that:</p>

<blockquote>
  <p>According to organizer Jøran Aulin-Jansson, the rook being on g1, the
  king destination, caused enough confusion to overturn the strict
  ruling</p>
</blockquote>

<p>This raises the question: <strong>In such situations how can the player legally castle on the side where the rook starts on the king's destination square?</strong></p>

<p>One humorous, though impractical at short time limits, solution was suggested <a href="https://twitter.com/bondegnasker/status/1189469446139797505" rel="noreferrer">here</a>.</p>

<p>Even more impractical was <a href="https://twitter.com/ChessProblem/status/1189239004530663424" rel="noreferrer">MrDodgy's suggestion</a>:</p>

<blockquote>
  <p>A true pro would pick up the rook from g1, toss it up in the air,
  slide the king to g1 and the rook would land dead centre of f1.  Press
  the clock, lean back in chair.  Flex.</p>
</blockquote>

<p>Still illegal.</p>
 9188: <p>Stian Yttervik made a comment that I think deserves to be expanded into a full answer. (I have changed the wording somewhat. That is not Stians fault)</p>

<p>Just pretend that the King is capturing the Rook.  </p>

<p>In other words: Move the King first. Use the King to gently push the Rook off-center and firmly place the King where it should be.  Then move the Rook where it should be.  Hit the clock.</p>
 8201: <p>There are two problematic cases in Chess960 castling:</p>

<pre><code>(1) rook starts on king’s destination square.
(2) king starts on king’s destination square.
</code></pre>

<p>It is not beyond the wit of man for the FIDE Laws to handle those cases explicitly. Maybe a future version of the rules will do so.</p>

<p>However the most important FIDE rule here is:</p>

<blockquote>
  <p>Too detailed a rule might deprive the arbiter of his freedom of judgement
  and thus prevent him from finding the solution to a problem
  dictated by fairness, logic and special factors.</p>
</blockquote>

<p>It must be difficult to rule in the excitement of such a situation. But had not GM So generously agreed to draw the game, the ruling could have effectively terminated the semi-final. The moral for players is to remain calm, and exercise opportunities for appeal. </p>
 19877: <p>I saw this in the chess news on a couple of sites, and it seems pretty simple to me. Pick up the K, and move it to g1, simultaneously pushing the rook off the g1 square. Then move the rook to its proper square.</p>

<p>In any case, you should pick up the K first, and then if you also want to pick up the rook, grab it second, and move them simultaneously. Either way, you are in compliance.</p>
 2944: <p>Touch your king, then your rook.  By rule 4.4.1, you are now required to castle.  You can now move the king and rook to their proper squares however you like, since you are already forced into a specific move and any subsequent piece touches can't change that.</p>
 4418: <p>The FIDE Laws of Chess actually cover this with a recommendation without mentioning the problem.</p>

<blockquote>
  <p>II.3.2.5.1 When castling on a physical board with a human player, it
  is recommended that the king be moved outside the playing surface next
  to his final position, the rook then be moved from its starting
  position to its final position, and then the king be placed on his
  final square</p>
</blockquote>

<p>The first time I read this I though "What a daft thing to suggest? Who is going to do that?" but now I see the point.</p>

<p>The FIDE Laws of Chess go on to state:</p>

<blockquote>
  <p>II.3.2.7 Notes<br>
  II.3.2.7.1 To avoid any misunderstanding, it may be useful to state "I am about to
  castle" before castling.</p>
</blockquote>

<p>Suppose Nepomniatchi had read that before and said those words before castling, would the arbiter have allowed him to castle the way he did?</p>

<p>So, it looks like this was thought of when the rules were written and they were written accordingly.</p>

<p>For practical play there is a simpler solution. According to 4.4.1 touching the king then the rook must be followed by castling. In cases where either the rook is on the king's square or the king is on the king's square just touch king then rook and then make the move. This solves all the associated problems.</p>
