Extract the AccountId from the Lookup. Query this from the account antity using the SOAP message. Extract the AccountNumber filed value. Finally create a new look up object with having the AccountNumber field value in the display name and assign this to the lookup.

Usage

Create a Webresource and put this method to the WebResource. Use the same web resource in the form where you want to implement this functionality and use the above function (ChangeLookUpDisplayValue) in the lookup field change. Pass the Lookup field name as parameter to the function.