If you can't find the key, try ( to open - opening) the lock with something like a knife or a screwdriver.
Happy New Year, Menem!
Both choices are correct; however, I do have a slight preference for "opening." The gerund (a type of noun phrase) works particularly well here because we often speak of "giving something a try."
There is also the common question "Have you tried V-ing?" E.g.: "Have you tried opening the lock that way?" Very few people would say, "Have you tried to open the lock that way?" Though both are correct, the gerund is more idiomatic.
You can also say:
- If you can't find the key, see if you can open the lock with something like a knife or a screwdriver.