Only Apple knows, but I'm going to guess they won't do it. I suspect the FBI has a pretty good idea what is and what isn't possible, especially since Apple has otherwise been cooperating with them. Also the people who work for the FBI aren't idiots, and I bet this isn't the first crime they've investigated with an iPhone.
Furthermore, Apple's argument against breaking this particular phone seems to be that they think such an action would compromise all phones. The actual FBI order seems to acknowledge this concern, and address it. Here's the relevant section of the order, with interesting parts highlighted:
Apple's reasonable technical assistance shall accomplish the following three important functions: (1) it will bypass or disable the auto-erase function whether or not it has been enabled; (2) it will enable the FBI to submit passcodes to the SUBJECT DEVICE for testing electronically via the physical device port, Bluetooth, Wi-Fi, or other protocol available on the SUBJECT DEVICE and (3) it will ensure that when the FBI submits passcodes to the SUBJECT DEVICE, software running on the device will not purposefully introduce any additional delay between passcode attempts beyond what is incurred by Apple hardware.
Apple's reasonable technical assistance may include, but is not limited to: providing the FBI with a signed iPhone Software file, recovery bundle, or other Software Image File ("SIF") that can be loaded onto the SUBJECT DEVICE. The SIF will load and run from Random Access Memory and will not modify the iOS on the actual phone, the user data partition or system partition on the device's flash memory. The SIF will be coded by Apple with a unique identifier of the phone so that the SIF would only load and execute on the SUBJECT DEVICE. The SIF will be loaded via Device Firmware Upgrade ("DFU") mode, recovery mode, or other applicable mode available to the FBI. Once active on the SUBJECT DEVICE, the SIF will accomplish the three functions specified in paragraph 2. The SIF will be loaded on the SUBJECT DEVICE at either a government facility, or alternatively, at an Apple facility; if the latter, Apple shall provide the government with remote access to the SUBJECT DEVICE through a computer allowing the government to conduct passcode recovery analysis.
So apparently, the FBI believes Apple could write this compromised firmware such that it would work only on the specific phone the FBI needs to access. The FBI is also willing to give Apple the phone so the firmware never even needs to be in the FBI's possession.
Given these provisions in the FBI's order that seem to specifically address the concerns in Apple's letter, we can only guess what Apple's reason for refusing the order may be.
It's possible there's some technical detail that Apple isn't telling us, and of which the FBI isn't aware. Or perhaps the FBI decided to ask for something they already knew to be impossible.
It's also possible that Apple thinks this is good PR. "Stick it to the man! iPhones are unhackable! Yeah!"
Maybe the courts will sort it out, maybe not. Probably we'll never know.