Cabs will run you $35-ish between the two. I've managed to make it during rush hour between JFK and LGA in 25 minutes or less, but I literally feared for my life a couple of times as we cut across 6 lanes of traffic and a median to make a left from the far right lane, cut off busses at the airport, etc. (nothing like NYC cabs

)
The bus is a good option IF you can find the right stop and the guy issuing fare--I've had a couple of times transferring between airports during which neither was to be seen, and I had to resort to a cab. It's a lot cheaper, and IME, doesn't take much longer than a cab.
I usually don't like to connect JFK-IAD-xxx, as the fares tend to be high, and the flights tend to be delayed. I usually end up taking the bus over to LGA to catch a US flight in those cases.