3 inch screws? why, that would go way to far into the box....all the screws need to do is go far enough into the MDF/wood to hold the sub in securely.3/4 would work good, supposing you used 3/4 MDF...that way they are just long enough that they won't come through the back side of the MDF
I use 1 1/2" screws, but Ive got a 3/4" ring of mdf on my box so I've got an 1 1/2" of mdf to screw into you aren't going to want anything longer than the thickness of your material.