Assuming I'm interpreting all this correctly and the bits that sound optional really aren't, it's not too hard to start at the end and work backward math-wise.
At the end of the story, you end up with $n$ each of green and blue apples. So before you ate one of each, you have $n+1$ of each.
The next step going backward is the halving of the larger group, which will result in one side doubling in our backwards work. The only other operations we'll perform on the green apples will be adding or removing one for the random color switch and halving for each of the two times the number of green apples was doubled. If the green group was larger at this point, we'll have an even number flipped to odd with the color change, which results in a non-integer result for the starting number of green apples. Therefore, the blue group must have been larger. At this point, we had $n+1$ green apples and $2n+2$ blue.
The unspecified color swap introduces a split in the possibilities. Before it we either had $n+2$ green and $2n+1$ blue with a green being swapped to blue, or $n$ green and $2n+3$ blue with an opposite swap.
Taking away a blue for the one that was added before that step gives us either $n+2$ green and $2n$ blue, or $n$ green and $2n+2$ blue.
At this point, both piles were doubled, so both are halved. We have $\frac{n+2}{2}$ green and $n$ blue, or we have $\frac{n}{2}$ green and $n+1$ blue.
Another halving for the greens puts us at $\frac{n+2}{4}$ green and $n$ blue or $\frac{n}{4}$ green and $n+1$ blue.
Take back the extra blue we put in, and you arrive at $\frac{n+2}{4}$ green and $n-1$ blue or $\frac{n}{4}$ green and $n$ blue.
Now the only thing left is to multiply the blues by 6, as I assume the bit about poisoning means you threw out 5/6 of the blue apples. This puts us at either $\frac{n+2}{4}$ green and $6n-6$ blue or $\frac{n}{4}$ green and $6n$ blue. Here's where we can use the initial constraint of starting with less than 10 times as many blues as greens.
If the swap was from blue to green, at this point we have $\frac{n}{4}$ green apples and $6n$ blue apples. This means we have 24 times as many blues and greens, so that can't be true. The swap was from green to blue, giving us $\frac{n+2}{4}$ green and $6n-6$ blue apples at the beginning. Using $k=\frac{n+2}{4}$, $n=4k-2$. So we have $k$ green apples and $24k-18$ blue apples. If $k$ is 2, we started with 2 green and 30 blue, which again violates the initial condition. However, starting with 1 green and 6 blue apples works.
Run through with 1 green and 6 blue apples, and you end up with 2 each of blue and green. However, let's assume the doubling spell creates blue apples with the same poison status as the ones you had before you used it. The blue apple you added could be poisoned and subsequently doubled, and both the second added blue and the green one that was color-swapped to blue could be poisoned. So when you get to the point of halving your number of blue apples, there is a $\frac{1}{216}$ chance none of your blues are poisonous, $\frac{10}{216}$ you have 1 poisonous blue, $\frac{30}{216}$ you have 2, $\frac{50}{216}$ you have 3, and $\frac{125}{216}$ you have 4.
Let's further assume that the half of the blue bunch to discard was chosen randomly. This gets very scribbly on my paper, but at the end of it we find there's a $\frac{17}{54}$ chance you have 1 poisoned apple in the final group, a $\frac{23}{48}$ chance you have 2, and a $\frac{55}{432}$ chance you have 3. Finally, assuming the apple to eat among that group is again chosen randomly, we end up with a $\frac{716}{1296}$, or roughly 55%, chance you are now poisoned. Hope you're feeling lucky.
Case 2: You didn't divide by 6
It's also apparently possible that you didn't divide the blue apples by 6. This takes things from a single solution to an infinite number of solutions. Everything is the same as in the previous, except we get to the point where we have either $\frac{n+2}{4}$ green and $n-1$ blue or $\frac{n}{4}$ green and $n$ blue, depending on the direction of the color switch.
If a green apple was turned blue, we're in the first case. We can use a similar substitution with $k=\frac{n+2}{4}$ to find that we started with $k$ green and $4k-3$ blue apples. This passes the initial condition for all positive integers $k$.
If a blue apple was turned green, we're in the second case. Even easier substitution this time, $k=\frac{n}{4}$ means we started with $k$ green and $4k$ blue apples. Once again, this works for all positive integers $k$.
tl;dr: You started with 1 green and 6 blue apples. Assuming perfect duplication and no checking of added blue apples for poison, you have a 55% chance of now being poisoned.
Alternatively, you started with $k$ green and either $4k$ or $4k-3$ blue. You are more likely to be poisoned in these cases.