As much as the client is prepared to pay.
Any more and the client won't buy. Any less and the developer is selling the IP for less than its market value.
So, how much is that?
1) How much would it cost to have someone else redevelop the product? All else being equal, the developer should charge a little less to ensure that s/he gets the business.
2) How urgent is the IP aquisition? It it is urgent, the developer can charge a premium for producing the source code immediately whereas another vender will have to work on it.
3) Are there any other benefits that the client has for buying from the developer? Or from elsewhere? The developer can charge for the former, discount for the latter.
Interestingly, the original cost of developing the product and its original licencing cost need have little to do with the present price of the IP, despite the appeal factoring these in to the sale price.
So, having decided on price point, the developer must decide if s/he is willing to sell at that price. This should be based on any long-term gains / losses from selling the IP:
a) Will transfer of the IP result in lost revenue? For example, retaining the IP may mean that the developer will be paid for updates and enhancements to the original product. Are these losses covered by the payment for the IP?
b) Will retaining the IP damage the relationship with the client, resulting in loss of future business? Or will the sale result in recommendations to other clients?
Finally, the developer and client need a clear and accurate written record regarding the terms of both the original licencing agreement and the terms of the IP sale.