In this scene from the 2009 Star Trek reboot, I think the intent is to remind us that the character Scotty is a brilliant, but human (and therefore flawed), engineer. He mentions having completed the calculations that should have, in theory, allowed long-distance transporter beaming between two moving points. He notes that he was "exiled" to a remote and lonely Starfleet station because his long-distance beaming test with an admiral's pet failed, and he can't understand why. The explanation supplied in the movie is that he had overlooked a simple factor: that space is also moving in addition to his beaming and destination points. This is a factor that is probably negligible when beaming, say, from orbit to a planet's surface or ship-to-ship when the ships are relatively close. Even if the two ships are both moving at warp speeds, sensor data could allow the transporter to compensate if the distance is not too great. (Note: None of the Star Trek series or movies ever establish how a transporter beam travels faster than light.) Back to the question: In his previous calculations, Scotty had overlooked the fact that everything in space is moving outward from the center of each galaxy. The galaxies in the universe are moving relative to each other, and if I recall an astrophysics lecture correctly, not all parts of space are moving at the same rate. I think (maybe, possibly, kinda sorta) that prevailing theories about entropy and the origins of our galaxy and the universe indicate that the parts of our galaxy slow down as they get farther from its center, which means Scotty overlooked the differences in relative motion of the origin and destination points pertinent to a long-distance transport. These differences in relative motions would be negligible for "normal" distances, amounting to irrelevant errors of a millimeter or two (or the transporter might automatically take them into account). Over longer distances, however . . . . Remember that Scotty himself missed his target slightly and almost drowned in that scene from the movie -- a nice bit of comic relief worthy of Gene Roddenberry's original vision/design/creation of this character (IMHO).
Now, about warp travel and lightspeed. In the Star Trek canon, I don't think warp travel and transporter technology are related. My understanding is that "warp" travel, in theory, works by encasing your vessel in a controllable energy field that contracts the density of space in front of your ship while expanding it at an equal rate behind you (sort of surfing a wave in space), essentially moving your vessel outside of normal space-time where the speed of light and Einstein's relevant theories about matter and energy don't apply. When Star Trek began in the Sixties, there wasn't even any theory in physics that supported warp travel as a concept; it was just a long-established science fiction literary device to get around that pesky lightspeed limit. In the 1990s, however, that changed. If you're really interested in actual warp (FTL) travel theory, Google the theoretical physicist Miguel Alcubierre, but don't look at the math unless you are Stephen Hawking or someone similar.