As a person currently on the final steps of the replacement process, I would advise against complicating the situation with Lawyers. Personally, I have nothing but great things to say about Ford RAV and the customer support teams, however it's the complete opposite with most Ford dealerships and service departments. The buyback or replacement process itself is pretty straight forward. The key is to be cordial and provide the requested documents in a timely manner.
Through my experience and discussions with the RAV team, they must follow your state Lemon Law guidelines. Google "Arizona Lemon Law" and read through the PDF under BBB.org's website. Page 4 explains both options. Option 1 (buyback/repurchase) - Everything is based off your dealership sales document and your receipts for any add-ons. The only thing that you will not get back or be able to calculate is the "reasonable allowance", which in my case was based on x cents per mile. Option 2 (replacement/MSRP to MSRP) is pretty straight forward, but with a caveat. You simply pick out a truck at any dealership, submit the VIN and dealership name to RAV and they do all the work. They will call the dealer to discuss, finalize and schedule the exchange. They will also pay your sales tax and all fees. The only difference you'll have to pay is the added value (if any) between MSRP old to MSRP new, in my case RAV even covered the sales tax difference! If you have a loan, you'll have to reapply either through the Ford dealership or your bank. If the new MSRP is higher, you simply add the difference to your new loan.
The caveat...Dealerships make little no no money on the exchange. In fact, the replacement vehicle also comes out of their allotment and to my understanding Ford Manufacture doesn't count it as a sale, but I could be wrong. In my case, I went from a Platinum to a Raptor and went through many dealerships to find one that would actually do the deal. Most of them quickly shut it down because they could make more money selling it outright. I'm sure going from a Raptor to a Raptor is a lot easier, but know that the dealer has to agree to the exchange. RAV cannot force the transaction because dealerships are privately owned.
Lastly, in addition to both options, I was offered up to $2,500 off on my next Ford purchase, unfortunately the incentive is NOT applicable towards Raptors or specialty vehicles! As others have mentioned, you need to calculate which is your best option. In simple terms, if you paid way under MSRP as in my case, your best option is likely MSRP to MSRP. Otherwise if you paid MSRP+, your best option would be to receive the buyout, including sales tax and then purchase a new Raptor at invoice or near it. There are a ton of dealerships selling 2019 Raptors for 6-8k right off the bat, the trick is to search between Midwest and East Coast.
GL!