To sell it to CarMax (or to anybody else), you would have to buy the vehicle out from the lease, take title, then sell it back. Depending on the state you live in, you will also likely pay sales tax on the $12,900 (where I live, in California, I would have to pay sales tax). Question is, would Carmax give you enough to make you whole? I kind of doubt it, but I could be wrong. Based on that, I wouldn't buy out the lease unless I planned on keeping the car.
GONE - 2015 FFE, Magnetic with leather interior, debadged & tinted
38,500 miles (since May 2015), average 246 Wh/mile
REPLACED WITH - 2018 Tesla Model3, LR RWD, Obsidian Black
11,000 miles (since Nov 2018), average 235 Wh/mile