DUI / DWI Attorney
Yes it is illegal. DO NOT DO THAT. You are describing a felony act.
Criminal Defense Attorney
The 17 year old is considered an adult; the 13 year old is not. By law, the 13 year old cannot give consent to have sex. Because there is more than 3 years of age differenct between the two, there is no defense and it would be considered sexual assault of a child.