That's not a royal flush you can only use 2 cards from your hand and three on the board. You had 3 in your hand that you needed for the royal.