Why does my code not return the requested number but always the requested number -1? : The Task is to create a Function.

The function takes two arguments:

current father's age (years)
current age of his son (years)

Сalculate how many years ago the father was twice as old as his son (or in how many years he will be twice as old).

```java

public static int TwiceAsOld(int dadYears, int sonYears){
		  
		  int dadYearsTemp = dadYears;
		  int years = 0;
		  int yearsAgo = 0;
		  
		  for (int i = 0; i <= dadYears; i++){
		  
		  if(dadYearsTemp / 2 == sonYears){
			  
		  years = dadYearsTemp;
		  
		  yearsAgo = dadYears - years;
		  
		  System.out.println(yearsAgo);
		  
		  return yearsAgo;
		  
		  }
		  
		  else if (sonYears * 2 > dadYears) {
			  
		  years = (sonYears * 2) - dadYears;
		  
		  System.out.println(years);
		  
		  return years;
		  
		  }
		  dadYearsTemp = dadYearsTemp -1;
		  }
		  
		  return 42; // The meaning of life
		  
		  }
```

So for example with an input of (30, 7) i would expect my function to return 16, because 16 Years ago the father was 14 which means he was twice as old as his son now (7). But my function returns 15. 

I guess its not a big mistake but i honestly cant find out why it doesnt work, so i would apreciate some help. Thank you.