When your friends share balance or data from their accounts to yours, the validity of the shared balance/data will be same as the validity of the original source of balance/data.
For e.g. let's say your friend shared 50MB with you which is due to expire in 72 hours. You will have 72 hours to use up the 50MB.
In case of shared data, you will see a separate line item appear in your data details page which will allow you to check the validity and remaining volume.
Shared data will not be accumulated with other data that you might already have in your account, and unused shared data volume will not be carried forward.