Spread construction adhesive onto one face of each of the two 2-by-4s.
Place one of the 2-by-4s on the side of the joist that is being spliced. Center the 2-by-4 over the crack or break in the joist. Tack the 2-by-4 down by putting a 4-inch-long screw into each end. Drive the screws in far enough to hold the 2-by-4 to the joist, but not so far in that they go through the other side of the joist.
Put the second 2-by-4 on the other side of the joist so the joist is sandwiched between the two 2-by-4s. Screw this 2-by-4 to the joist with 4-inch-long screws, driving the screws all the way in so that they go through the 2-by-4, through the joist and into the opposite 2-by-4.
Go back to the first two screws you drove in and finish driving them in so they go through the joist and into the second 2-by-4.
Add more screws along the length of both 2-by-4s. The more screws you put in, the stronger the splice will be.