If 18% of the pieces in the box were unpainted, that means 82% of the pieces in the box were painted.
And since 738 pieces were painted, that number comprises 82% of the total number of pieces.
Therefore, the number of pieces in the box was : 738 : 82% = 900 (pieces)