this sounds like a fun homework question for upper-division astronomy !!
a couple more points to consider in your solution:
- small angle approximation (to go from radius r to solid angle subtended by the star's disk as seen from the planet).
- is the planet rotating? if rotating fast, temperature as a function of longitude will be constant. if rotating slow, it will have a hot side and cold side. this affects how you interpret the average temperature T_p.
- temperature will vary with latitude. this will be symmetric at equinox and asymmetric if there is an obliquity. this affects how you interpret the average temperature T_p.
- albedo, as mentioned by @Thomas in the comments. emissivity is usually assumed to be 1 for these kind of problems.
PS. i am a new contributor, so my apologies for "answering" with not a complete answer. i have a low reputation, so i am not able to put these important points as comments. besides, i'm not sure what the ethics are of just giving a straight-up answer to homework questions on here.