This is a bit longer way to find. But,
Let's choose six spaces to be filled with numbers. First one can be filled in 49 ways. Then consider scenarios as to how to chose the next number such that it is distinct and not adjacent to the first one. If the first space is either of 1 or 49, then the second space can be chosen in 47 ways. And so on. However, if the first space is not 1 or 49, then you can choose the second space in 46 ways. Make 2 such scenarios and conclude.
I didn't know how to do this one but I figured out what the answer was by exhaustion . I used python to come up with the fact that D is the answer. I then worked backwards, here is how to get it. There is almost nothing to it, but you have to look at the problem in the right way.
Think of the problem this way. Suppose you have 6 balls and 43 spacers (6+43=49). The spacers are interchangeable (you can't tell one from the next). You are going to arrange each ball and spacer in a line from left to right. The only rule is that you have to put 1 spacer in between each ball. You can then put the rest of the spacers anywhere along the line. This is exactly equivalent to the stated problem. To see this, just think of numbering the left most item 1, then the next item 2, etc. The list of "ball" numbers is a valid picking of 6 numbers from 49 with no consecutive numbers (there is at least 1 spacer in between).
But now we are looking at in a way that we can do something with. You have 7 different places to put 38 spacers (43 spacers minus the 5 that are already spoken for). This is equivalent to picking 38 items from 7 categories with replacement (order doesn't matter - or make sense). This is (drum roll please)