If you are backing out at inspection, it should be during the contingency period; Only then will you be given your earnest money back. After the contingency period, you cannot get a refund.