Roll the carpet back slightly to get it out ... measure the opening and then cut the threshold with metal snips or a hacksaw. If the carpet edge is in good shape, you can place the new threshold ...