The exponential branching factor of a 3x3x3 board at the initial move is 27. For a 5x5x5, it is 125. At two ply (4 moves ahead), the prior program will have examined 421,200 states. For the 5x5x5, it is 232,593,000 states.

So even at two ply search depth, the 5x5x5 program will be 552 times slower than the 3x3x3 program. And that's assuming you have no bugs in your code.

EDIT: of course, since you are using alpha beta pruning, you're really looking at the square root of that number (sqrt(552) = ~23), but that's assuming the move-ordering is absolutely perfect, which I doubt it is.

This is just the nature of exponential search spaces.