We have that the formula of the volume of the triangular prism is:

Where A is the area of the base and h is the height. Then we can write the volume like this:

now, if b=20, h=42 and V=20580, then we substitute and solve for p:

therefore, the value of p is 49 milimeters