I don’t claim to know what the motivation is.
My opinion is that Mr. Trump is completely transactional and sees his decisions in terms of “winning” a zero-sum game. I think his idea of winning in Venezuela is about as pure as his motives get. He didn’t break it but he wants to fix it and claim victory because his foreign policy has been one debacle after another and he needs a win before the election.
Mr. Putin is more strategic and he is supporting Cuba and therefore Maduro to keep a thorn in the side of the US and thumb his nose at the Monroe Doctrine as he misunderstands it. He feels no necessity to give Trump the win, so I doubt that he had to think very hard about Cuba v. his new pal in the US.
This is all speculation. Your guess is probably as good as mine, but I am convinced they are not sparring over petroleum.