Yes, you should be able to do that as long as the program doesn’t have any restrictions on how many devices it can be installed on. Just make sure you’re adhering to the software’s license agreement. Uploading it to a cloud service and then downloading it on PC B should work fine.