howdy all, i was wondering if you could help tell me how to go about solving this problem, answer isnt neccesary, just the steps to go about solving it.

"use the given data to find the minimum sample size required to estimate the popultion proportion.
1) margin of error= .004, confidence level = .95, p hat and q hat are unknown

2) margin of error= .05 confidence level= .99, p hat is estimated at .15

any help would be appreciative