After 12 days of construction, the workload completed by the two teams is equal to the total workload of Team A; Then 20 days after the start of construction, the total workload is equal to 20/ 12=5/3 times of Party A's workload, and Party B has finished it, so Party A's workload is 5/3- 1=2/3.
Therefore, the total length is: 300/( 1-2/3)=900 meters.