This. If they won't declare with you from the Discuss screen, go to Trade, select "Declare War On..." (your enemy), and click "What Do You Want For This?". If they say "There is no way to make this deal work", then you're out of luck, but sometimes they will offer to attack if you give them cash/strategic resources/etc.