Hi, welcome!
Homework inspired questions are welcome here, but you have to tell us what have you tried so far? what is your specific problem? We are more inclined towards helping you with specific coding problems rather than doing your work for you.
For guidelines about how to properly ask homework related questions here, please read our homework policy.
If you have no basis to start, perhaps you would be best served by learning basics of r , swirl package is useful for that.
The free book R for datascience is free online and a great intro to tidyverse way of working in R.
However, perhaps you do have some foundations. Therefore , perhaps you know( or can find reading material) on how to use the uniroot function you have your eye on. At least to where you can use it manually on one function. Then we can discuss such things as generalising and iterating from a specific case