If the sale price of a home is 20000 under the appraisal can you legally add in your payout of a chapter 13 bankruptcy to your mortgage loan if it is FHA?

No. FHA does not allow the buyer to receive any funds or form of cash outside of close in excess of the contract sales price. Paying off Ch. 13 is not required for you to purchase your home.