Help with Tinder app

hi, I need help with an app coding. I try t use Tinder algorithm, yet I have no experience on this level of coding. I just wanna make some necessary changes on tinders code and adapt it to my new app. How should I do that and do you think it is legal?