Optimal task and motion planning (TAMP) has seen an increase in interest in recent years. An important performance bottleneck when solving such problems is that solving motion-planning problems for nonholonomic systems to (resolution) optimality is relatively costly, and when this has to be done a potentially large number of times, in the form of a subroutine, time quickly adds up. In this work, we significantly increase the efficiency of our previously presented optimal TAMP algorithm for rearrangement problems. The core idea that we introduce in this work is to use intermediary results from the motion planner to infer solutions to other related motion-planning problems that might be of interest to the overall TAMP problem. We also introduce the concept of equivalent states to recognize state-action pairs that require the solution of the same motion-planning problem in order to compute their associated cost. Evaluations on numerical examples considering rearrangement TAMP problems involving tractor-trailers show that the proposed strategies can significantly reduce the total computation time of the TAMP planner, as well as the number of motion-planning problems that are solved, and the number of candidate task plans that are computed.