Hello Athena1030 and Welcome to Excel Forum.
Please paste the following formula into cell G5 and then drag the fill handle over and down:
Formula: copy to clipboard
=IF(OR($B5>G$3,$C5<G$2),"",MIN(G$1,NETWORKDAYS(MAX(G$2,$B5),MIN(G$3,$C5)))*$D5*$E5)

Note that for this to work the values in rows 2 and 3 must be actual dates. In the file attached to post #1 they are texts that look like dates (paste special multiply by 1 will convert them quickly).
Note that the date range 10/18/2020 to 11/17/2020 has 22 workdays.
Let us know if you have any questions.