I had the same exercise some years ago
And i remembered the result was 1/6 for a rod with length 1 :rolleyes: anyways what I did was drawing a figure instead of integrating, a tetraeder (or tetrahedron, dunno how what it is, you know a pyramid with triangle as base) where the rightangled triangle base consists of the probability scale 0-1 and the length factor involved. As you divide off the height anyway, i've set it 1. The volume of a tetraeder is height* (length*width/2)/3 length*width being the base area, You get the same formula when you integrate, for sure. So that results in a/3 for length=2a