You are an exempt individual (exempt from the Substantial Presence Test) as a student during your time on F-1 status in 2017, because you have not been an exempt individual for some part of 5 previous calendar years (only 2 previous calendar years). The only days of presence that count for your SPT for 2017 are the 3 months you were on H1b status, and that is not enough to meet the SPT for 2017. So you are a nonresident alien for all of 2017.
You have the option of using the First-Year Choice, once you meet the SPT for 2018, to make yourself a dual-status alien for 2017 (resident since you started H1b, nonresident before). Note that you will have to wait until the middle of 2018 (only 1/3 of the days the previous year count in the SPT, so the 3 months in 2017 you were on H1b only counts for 1 month in 2018, so you need about 5 months more in 2018 to meet the SPT for 2018) before you meet the SPT for 2018, so you will have to file an extension for your 2017 taxes in order to do this. Note that being dual-status doesn't really offer many advantages over being a nonresident alien the whole year -- e.g. you still can't file jointly, and you still can't take the standard deduction.
If you are married, after using the First-Year Choice to become dual-status, you can further use the Choosing Resident Alien Status or Nonresident Spouse Treated as Resident choice to make both you and your spouse resident aliens for all of 2017 and file jointly.