Steps to restore a SQL Server database to a point in time Time given lies in all three backups, full, diff ,log:


full - 12 midnight
diff - 4 am ( every 4 hours)
log  - 15 minutes interval


When:


time restore is 5:17
time restore is 5:14


How should I answer that?
Your question is bit unclear; you have not specified whether there was a failure and at which time the failure happened.

In general, restore steps are:


Restore the latest full backup with no recovery
Restore the latest diff backup with no recovery
Restore transaction log backups with no recovery, except the last transaction log backup which falls withing the recovery time and specify the stop at time.


i.e. in above scenario: 

for 5:17


restore full backup that was taken at midnight with no recovery
the diff backup taken at 4am with norecovery
restore all t-log backups until 5.15 with no recovery 
restore t-log backup taken at 5.30 with stop at 5.17 and with recovery


For 5:14, do step 1, do step 2, step 3 all t-log backups till 5am with no recovery.  Then restore t-log backup taken at 5.15 with stop at 5.14 with recovery.