Just take the keyboard out and use that for other laptop. If your keyboard is still good and you use that to replace laptop keyboard for same type or model of laptop, it should work fine
This isn't technically wrong but it fails to put in a very important detail - if the laptops come from two different manufacturers, the mounting mechanisms to mount the keyboard to the laptop could be totally different.
Most laptops use ribbon cables to connect the keyboard - no issues there, it's pretty universal among all laptops. But how the manufacturer's actually mount them is an entirely different story. Yes, you could theoretically use the keyboard on a different laptop, but it's pretty likely that it's just going to be hanging out on the side or very loosely on the top of your laptop. Not really ideal.
If they're at least similar laptops it's certainly worth trying. If not, it may not be worth your trouble. It would be better to buy a cheap USB keyboard for $5 at a computer store.