First of all, make sure the iPhone is using iOS 8. In the settings app, select Notifications, then Messages. Make sure the "show on lock screen" is turned on.
When you get a text message it will show on the lock screen, then just slide to the left and select reply.