Answer:
The program in Java is as follows:
public class Main{
 public static void main(String[] args) {
  double discount_percent = 0.15;
  double discount_amount = 600;
  double profit = 0.20;
  double marked_price = discount_amount/discount_percent;
  double cost_price = marked_price/(1 + profit);
  System.out.println("Marked Price: "+marked_price);
  System.out.println("Cost Price: "+cost_price);
 }}
Explanation:
For explanation purpose, let 
 Marked Price
 Marked Price
 Percentage discount
 Percentage discount
 Discounted amount
 Discounted amount
 Percentage Profit
 Percentage Profit
 Cost Price
 Cost Price
The marked price (i.e. selling price) is calculated discount using:

The derived formula of the cost price from percentage profit and Marked Price is:

So, the explanation is as follows:
The next three lines declare and initialize the given parameters
<em>  double discount_percent = 0.15;</em>
<em>  double discount_amount = 600;</em>
<em>  double profit = 0.20;</em>
Calculate marked price
  double marked_price = discount_amount/discount_percent;
Calculate cost price
  double cost_price = marked_price/(1 + profit);
Print marked price
  System.out.println("Marked Price: "+marked_price);
Print Cost price
  System.out.println("Cost Price: "+cost_price);