The correct answer is $\boxed{\text{B. }87,000}$.
A flexible budget is a budget that is adjusted to reflect changes in the level of activity. In this case, the flexible budget amount is $82,000, which is the amount that was budgeted for the actual level of activity. The actual result is $45,000, which is less than the flexible budget amount. This means that the company performed better than expected.
Option A is incorrect because $97,000 is more than the flexible budget amount. Option C is incorrect because $27,000 is less than the actual result. Option D is incorrect because $37,000 is the difference between the flexible budget amount and the actual result.