Almost no modern apps will work on iOS 5 or 6; these versions are primarily for nostalgia or basic tasks.
: Jailbreak your current iOS (usually 9.3.6), install CoolBooter from Cydia, and choose iOS 5 as the secondary operating system.
Use a blob checker like shsh.host to verify your iOS 5.1.1 blobs are valid for your device.
This is a popular script-based tool used by the Legacy Jailbreak community to downgrade older devices. It may allow for iOS 5 installation if you have specific hardware/software configurations.
Before you start, it's crucial to understand the implications and prepare your device: