Hold the Lock Button
Slide the Slide To Power Off slider [If touch is disabled/you're unable to slide it, do a hard reset — hold the lock and home button for 8 seconds until the Apple Logo appears]
When your iDevices powers up, immediately exit the app that automatic open.
Go to Settings > General > Accessibility > Guided Access
Click Set Passcode
Enter new password
Wait for the app to automatically open and Triple tap the home button
Enter the new password