Text this: A Double-Layer Optimization Method for Cascading Failure Prevention Considering Transient Stability