this example with out of gas. Create new transaction with nonce 5 not work, because tx is confirmed. How can i return 0.017 eth from fail transaction
Your transaction failed, because it ran out of gas. Whenever a transaction runs out of gas or fails for other reasons (e.g. a smart contract that reverts), the Ether sent in the transaction is returned. You only pay the gas used by the transaction, which is
Gas price * Gas limit.
You can read more about gas here.