The "can" in Line 2 refers to logical possibility.
At least, I think that's that's true of Kant's "ought implies can" principle.
The "can" in Line 1 refers to physical possibility.
The argument is sound only if the two "can"s refer to the same modality.
You could replaced the "can" in Line 1 with logical possibility, and then the argument would be valid. The view that whatever can logically be done actually is done is called Necessitarianism. It's pretty fringe.
Alternatively, you could replace the "can" in Line 2 with physical possibility, and then the argument would be valid. I don't know if that view has a name, it seems pretty implausible.